UITabBarController with 5 tabs does not always call viewWillTransition:toSize
| Originator: | hotngui | ||
| Number: | rdar://31969944 | Date Originated: | 5/3/2017 |
| Status: | Open | Resolved: | |
| Product: | UIKit | Product Version: | 10.3 |
| Classification: | Serious Bug | Reproducible: | YES |
Area: UIKit Summary: I have a scenario whereas I need to add a VC as a childViewController to the app that has a UITabBarController as its rootViewController. Without getting into too much detail about why, think "tooltip" or "overlay". If that UITabBarController happens to have 5 tabs, the viewWillTransition:to:with: method of the childViewController does not called on various rotations of the device - if the device is an iPad Air 2 and the split screen is setup as 2/3. I created an example project that demonstrates this problem. The green rectangle should maintain a width that follows the width of the window. After several rotations the landscape mode will not have the transition method called. This only happens on 2/3 split (in landscape) "Initial Screen.png" - show the example at just after I start the app "Bad.png" - shows the app in a bad state after a few rotations "After Some Rotation.png" - this screenshot shows that the 5th tab is now the "more" button which is incorrectly being shown. Steps to Reproduce: 1. uncompress the example project 2. build the example project 3. run the example app 4. setup the 2/3 split 5. start rotating the app a few times 6. stop on the second time you get to landscape mode 7. observe the size of the green rectangle is wrong. Expected Results: viewWillTransition:to:for should be called all the time. Actual Results: viewWillTransition:to:for not getting called when there are 5 tabs in the UITabBarController AND rotated several times in 2/3 split mode. Version: iOS 10.3 Simulator and iOS 10.3.1 device Notes: Configuration: iPad Air 2 (2/3 split) Attachments: 'BAD.png', 'TestTabControllerTransition.zip', 'After Some Rotation.png' and 'Initial Screen.png' were 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!