UINavigationController doesn't shrink size when topViewController.preferredContentSize shrinks

Originator:an00na
Number:rdar://28564552 Date Originated:30-Sep-2016 09:25 AM
Status:Open Resolved:
Product:iOS SDK Product Version:10.0
Classification:UI/Usability Reproducible:Always
 
Summary:
UINavigationController is presented as popover. When topViewController.preferredContentSize enlarges it correctly enlarges the size. However, when topViewController.preferredContentSize shrinks it doesn’t shrink the size.

I guess bug may be in UINavigationController.preferredContentSizeDidChange(forChildContentContainer:).

Steps to Reproduce:
1. Launch sample app
2. Tap Pop button to present the popover.
3. Tap + button to enlarge topViewController.preferredContentSize. It works.
4. Tap - button to shrink topViewController.preferredContentSize. It doesn’t work.
5. The label displays the value of topViewController.preferredContentSize.


Expected Results:
UINavigationController shrinks size when topViewController.preferredContentSize shrinks.

Actual Results:
UINavigationController doesn't shrink size when topViewController.preferredContentSize shrinks

Code: https://cloudup.com/iHBzOfMODIT

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!