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

Views do not respect 'Hidden' property in iOS 8 like they do in iOS9 #6

Closed
toddrick opened this issue Oct 11, 2015 · 4 comments
Closed

Comments

@toddrick
Copy link

One of the perks of UIStackView is that hidden views do not affect the layout. So if a view is marked as hidden it's as if it didn't exist. This behavior is absent from iOS8, where marking a view as hidden will still force it to occupy it's space.

@sunnyxx
Copy link
Member

sunnyxx commented Oct 12, 2015

Actually, a hidden subview DO affect the layout, UIStackView adds a width/height constraint of zero constant to make that hiding view "collapsed" , other constraints are still connecting against it, a zero width or height makes it not rendering.

@sunnyxx sunnyxx closed this as completed Oct 12, 2015
@toddrick
Copy link
Author

With FDStackView, it does not respect this. If you modify your demo project to sit views as hidden, the behavior differs depending on which iOS version you are running. I would consider this a bug.

@nobre84
Copy link

nobre84 commented Apr 15, 2016

@sunnyxx If FDStackView can't animate hidden property as UIStackView can, this issue should remain open, don't you think?

@dsmo
Copy link

dsmo commented May 25, 2018

实际上 UIStackView 是不对 Hidden 的 Subview 做 layout 计算的,WWDC 201717#412 有提到,目前这个问题还是存在的,iOS 8 上不能通过设置 hidden 对 FDStackView 的 subviews 动态显示和隐藏

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

4 participants