view controller layout guides not propagated by container view controllers
| Originator: | senior | ||
| Number: | rdar://14882141 | Date Originated: | 2013-08-30 |
| Status: | Resolved | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 7 b6 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
A UIViewController contained within a UINavigationController has a topLayoutGuide property whose length correctly accounts for the height of the UINavigationBar and the status bar.
However, this value is not propagated correctly to child view controllers contained within the UIViewController.
Steps to Reproduce:
See attached file for source code. Explanation is:
Add a custom container controller as a child view controller of a UINavigationController, as such:
UINavigationController
TSContainerController
TSChildViewController
- The TSContainerController's topLayoutGuide is correct (64 points)
- The TSChildViewController's topLayoutGuide is incorrect (20 points)
Expected Results:
A child view controller should incorporate its parent view controller's topLayoutGuide length.
The docs for topLayoutGuide define the screen position as "If a navigation bar is visible onscreen, the bottom of the navigation bar," which is not true. A navigation bar is visible onscreen, but the the topLayoutGuide doesn't incorporate it.
Actual Results:
Child view controller only incorporates the height of the status bar.
Regression:
Notes:
I haven't tested if this is also true with bottomLayoutGuide.
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!