lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
245 stars 17 forks source link

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

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

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:

  1. Nav pop animation should work as normal.

Actual Results:

  1. There is no nav pop animation.

Version/Build: Xcode 10.2.1 Simulator 12.2

Configuration: iPhone 8 Plus Simulator

- Product Version: 12.2 Created: 2019-05-31T11:49:18.166634 Originated: 2019-05-31T00:00:00 Open Radar Link: http://www.openradar.me/51298721