UINavigationController removes childViewController when another childViewController is added during another child's -viewWillAppear: or -viewDidAppear:
| Originator: | heath.borders | ||
| Number: | rdar://14897231 | Date Originated: | 03-Sep-2013 11:37 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | Version 5.0 (5A11386k) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: I want to make the view of a UIViewController (VCB) the titleView of another UIViewController's (VCA) navigationItem. Adding VCB to VCA's navigationController in -viewWillAppear: seems best. If I do this (or add VCB during VCA's viewDidAppear, the navigationController makes VCA disappear (confirmed by VCA's viewDidDisappear method). Steps to Reproduce: 1. Run the attached project. 2. Observe that it properly adds the child view controller when view controller containment is not used. 3. Observe that it doesn't properly add the child view controller when view controller containment is used in viewWillAppear: 4. Observe that it doesn't properly add the child view controller when view controller containment is used in viewDidAppear: Expected Results: View Controller Containment should work for UIViewControllers in UINavigationController's navigationBar. Actual Results: View Controller Containment don't work for UIViewControllers in UINavigationController's navigationBar. Project: https://github.com/hborders/14897231_UINavigationController_addChild_loop
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!