Moving UIViewController from one window to another breaks rotation in iOS 8.1

Number:rdar://18906964 Date Originated:07-Nov-2014 12:38 PM
Status:Open Resolved:
Product:iOS 8 Product Version:
Classification: Reproducible:Always
eter Steinberger07-Nov-2014 12:38 PM

Moving a UIViewController instance from the main window to a different window by setting it as the rootViewController breaks rotation behavior on iOS 8.1. This is a regression that first occurred in iOS 8.1. iOS 8.0.x and iOS 7.x are not affected.

Steps to Reproduce:
Download the attached example project and perform the following steps:

1. Run on iPhone with iOS 8.1
2. Tap the "New Controller" button while in portrait mode
3. Notice that the blue view is now in fullscreen
4. Rotate the device to landscape
5. Notice that the rotation works properly
6. Rotate back to landscape
7. Dismiss by tapping the blue view
8. Tap the "Re-use Controller" button while in portrait mode
9. Notice that the blue view is now in fullscreen
10. Rotate to landscape
11. Notice that the landscape view is not properly sized
12. Restart the app before trying again to restore the initial state

Expected Results:
The blue view is properly sized to occupy the entire UIWindow.

Actual Results:
The blue view is improperly sized.

iOS 8.1

Also broken in iOS 8.1.1b1. Affects both iPad and iPhone.

iPad Air 2

'' was successfully uploaded.



I've finally found a workaround for this:

But ugh... we're using undocumented things to clean up the VC state here. Not great.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!