I am implementing a UIStackView
and populating a UIStackView
dynamically. But when there is a single view in UIStackView
, the view is not centred in the UIStackView
.
I use horizontal axis, center alignment and fill equality
distribution in UIStackView
. How can I start to populate UIStackView
by putting views in center of the UIStackView
?
Current behaviour of UIStackView
I want to start adding stars in the center of the UIStackView
I am new to UIStackView
sorry for an easy question.
I'm adding arranged views like;
tmpView = [[UIView alloc] init];
tmpImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iconStar"]];
[tmpView addSubview:tmpImageView];
[self.horizontalStackView addArrangedSubview:tmpView];
How can I achieve desired behaviour?