Interface builder calculating very wrong height for stack view
Originator: | stephen.gazzard | ||
Number: | rdar://28446980 | Date Originated: | September 23, 2016 |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | 8.0 (8A218a) |
Classification: | Reproducible: | Always |
Summary: This is my scenario: 1. I have a UI with a scroll view 2. Inside that scroll view, I have a vertical stack view. 3. That stack view contains a label, 5 text fields, a horizontal stack view with two buttons, an activity indicator, and another label. 4. The bottom label has an empty text field (to be filled in with code) 5. The stack views constraints pin it inside the scroll view with spacing of 20 Steps to Reproduce: 1. Download attached storyboard file 2. Change the text of the bottom label to anything 3. Observe that the stack view has a height that makes sense 4. Delete the text in the bottom label 5. Observe that the stack views height balloons to > 18K 6. Change the # of lines in the bottom label between 0 and 1 7. Observe that each time you make a change, the height of the stack view grows, eventually capping at a little over 9 billion Expected Results: The scroll views height at design time 667, so I would expect that with 20 points difference above / below the scroll view, its height would be around 627, or it would be the height of its content (around 340) Actual Results: The scroll views height is 18K, and if I modify the bottom labels # of lines, the stack views height changes, until it reaches 9 billion Version: Version 8.0 (8A218a), 10.12 (16A320) Notes: Configuration: Macbook Pro '12 edition Attachments: 'Main.storyboard.zip' was successfully uploaded
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!