This is a bug that exists in iOS 10.2+ (didn't check on previous versions).
When hiding an arrangedSubview of an UIStackView
using UIView animation API multiple times, the isHidden
property values "stack" and it requires settigns isHidden
to false
multiple times before the value updates.
- Add an arranged subviews to
UIStackView
- Call
isHidden = true
the subview within a UIView animation block multimple times - Call
isHidden = false
on the same subview - Observe that it doesn't appear and still has
isHidden
still set totrue
- Call
isHidden = false
until the value of the property actually changes tofalse