UIStackView's views animate automatically from their initial frames when pushed by navigation bar

Originator:ikhsan.assaat
Number:rdar://34658233 Date Originated:09/26/17
Status:Open Resolved:No
Product:iOS + SDK Product Version:11.0
Classification:UI/Usability Reproducible:Always
 
Area:
UIKit

Summary:
When pushing a view controller that has stack view and stack's isLayoutMarginsRelativeArrangement is set to true, all arranged subviews inside stack animate from their initial frames. This does not happen in iOS 10.x.

Steps to Reproduce:
1. Create ViewController that will push StackViewController
2. Create StackViewController which has a custom view as its main view. The custom view has a UIStackView as its main subview
3. Set stack's isLayoutMarginsRelativeArrangement to true
4. Add multiple views as stack's arranged subviews
5. Run
6. Push StackViewController from ViewController

Expected Results:
StackViewController has all its views configured correctly before being pushed. Only push transition is being animated.

Actual Results:
StackViewController has all its views not configured before being pushed, instead, views are at their initial frames. Push transition and arranged subviews transition are being animated.

Version/Build:
iOS 11.0

Attachment: 
https://gist.github.com/ikhsan/466df0568cd84d68a05d34a8c960d791

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!