Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addArrangedSubview doesn't increase OAStackView height properly #39

Closed
chika-kasymov opened this issue Aug 20, 2015 · 1 comment
Closed

Comments

@chika-kasymov
Copy link

Hello!

I added OAStackView to UIScrollView with IB. UIScrollView has leading, trailing, top and bottom constraints to superview (just UIView of VC). OAStackView also has same constraints, but according to UIScrollView. And in addition OAStackView has same width as UIView (superview of UIScrollView).

In the beginning all views on OAStackView have right sizes and positions as I set. But when I try to append another UIView by using addArrangedSubview, OAStackView increases it's height by 10 (spacing of OAStackView as I set). Therefore after I append another UIView, it position is above previous view.

Maybe I need update OAStackView constraints or size some how?

Thanks for any advance!

@chika-kasymov
Copy link
Author

I solved this issue. It was not a bug. When adding new UIView to OAStackView or UIStackView you have to specify view's height or width constraint with Auto Layout depending on axis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant