iPhone Plus landscape split controller primary-hidden state restore breaks portrait master navigation pop animations

Originator:indiekiduk
Number:rdar://51298721 Date Originated:31/5/19
Status:Open Resolved:
Product:UIKit Product Version:12.2
Classification:Bug Reproducible:Always
 
Area:
UIKit

Summary:
On iPhone Plus devices, after state restoring a split view in landscape DisplayModePrimaryHidden (i.e. the detail was made full screen using the 2 arrows display mode button), when rotating to portrait the navigation controller's pop  animation is broken and cannot be fixed without restarting the app (that is no amount of rotating or changing modes repairs it).

I think the problem is caused somewhere in UISplitViewControllerClassicImpl, decodeRestorableStateWithCoder, _changeToDisplayMode: forCurrentOrientationOnly:, [UIView performWithoutAnimation:rdx];

iPads and new iPhones (X, Xr etc.) that support overlay mode do now have a call to _changeToDisplayMode during state restoration thus unaffected, it only happens on 6 Plus, 7 Plus, 8 Plus.

Please see this video displaying the broken navigation animations in portrait. Notice after rotating to portrait there is no nav pop animation.
https://youtu.be/ffK66TTykDA

Is this or dupe or would you like a sample? I can provide a sample of the Master Detail template with state restoration added.

Steps to Reproduce:
1. From Xcode launch a state restore enabled Master detail app (with core data) on the iPhone 8 simulator. I can provide one if necessary.
2. Rotate to landscape.
3. Add an item.
4. Select the item.
5. Tap the display mode button to take the detail full screen.
6. Press command+shift+h to suspend the app.
7. Stop it running in Xcode.
8. Run it again from Xcode.
9. It should appear exactly as left with the detail in full screen landscape.
10. Rotate to portrait. 
11. Tap the back button.

Expected Results:
12. Nav pop animation should work as normal.

Actual Results:
13. There is no nav pop animation.

Version/Build:
Xcode 10.2.1
Simulator 12.2

Configuration:
iPhone 8 Plus Simulator

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!