Issue with UINavigationController embedded in UITabBarController in Landscape-Orientation on iPhone 6 Plus

Originator:Ryan.Zulkoski
Number:rdar://21103395 Date Originated:05/26/2015
Status:Open Resolved:
Product:iOS SDK Product Version:8.3 (12F70)
Classification:UI/Usability Reproducible:Always
 
Summary:
I have a UITabBarController with more than 8 viewControllers. Most of the viewControllers are UINavigationControllers with their own viewController stacks. When in portrait-orientation the iPhone 6 Plus displays 4 tabBarItems and a "More" button. In landscape-orientation the iPhone 6 Plus displays 7 tabBarItems and a "More" button. The problem occurs if the user is on the 6th or 7th tab in landscape-orientation, rotates to portrait-orientation and then back to landscape-orientation. At this point the user is presented with an empty UINavigationController with a black background. In portrait-orientation it will still be fine, but it will never recover in landscape-orientation. The console also starts displaying the "Unbalanced calls to begin/end appearance transitions" message when rotating back to portrait-orientation.

I suspect that during the first access of the sixth or seventh tab in landscape-orientation the viewController hierarchy is left intact as intended. Once it is rotated to portrait-orientation the contents of the tab's UINavigationController are removed and pushed onto the moreNavigationControllers stack. Once the phone is rotated back to landscape-orientation the viewControllers are never properly inserted back into their original navigationController and instead remain inside of moreNavigationController.

Steps to Reproduce:
1. Create a new 'Tabbed Application' project in XCode. (I've uploaded a sample project)
2. Copy the provided viewControllers and attach the copies to the UITabBarController under the "viewControllers" relation until you have at least 9 viewControllers.
3. Make sure that at least the sixth and seventh viewControllers are embedded inside of a UINavigationController.
4. Run the project on the iPhone 6 Plus simulator.
5. Rotate to landscape mode.
6. Select the sixth tab.
7. Rotate to portrait.
8. Rotate back to landscape.
9. Notice the black background. If you put in a breakpoint and 'po' the contents of moreNavigationController you will notice that the view controller associated with the  sixth tab's UINavigationController is still attached.

Expected Results:
I would expect the original contents of the sixth and seventh tab to be displayed in their original parent UINavigationController when rotating back to landscape-orientation from portrait-orientation.

Actual Results:
The sixth and seventh tabs would look like empty UINavigationControllers with black backgrounds when in landscape-orientation after a couple of rotations.

Version:
8.3 (12F70)

Notes:
It may also be worth noting that if the user is looking at the first item in the "More" tab (eighth view controller) in landscape-orientation and then rotates to portrait-orientation they are redirected to the fifth view controller.

Configuration:
Only occurs on iPhone 6 Plus in Landscape-Orientation

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!