Rotation Lock bugs

Originator:an00na
Number:rdar://25614825 Date Originated:07-Apr-2016 06:56 PM
Status:Open Resolved:
Product:iOS SDK Product Version:9.3.1
Classification:Other Bug Reproducible:Always
 
A normal view controller(let's call it vc) presents a view controller that *prefers*(but still support portrait orientation) landscape orientation(let's call it lvc). 

Variation A, normally behavior:
1. Screen is in portrait mode. Put iPhone on a flat desktop. vc is in portrait mode.
2. vc presents lvc in landscape mode.
3. Dismissing lvc returns to vc in portrait mode.

Variation B(this one does not involve rotation lock but I believe it is a closed related issue so also filed in this bug report):
1. Screen is in portrait mode. Put iPhone on a flat desktop. vc is in portrait mode.
2. vc presents lvc in landscape mode.
3. Press power button to lock screen.
4. Unlock screen.
5. Dismissing lvc returns to vc in *landscape* mode. (Inconsistent with A, also feels incorrect)

Variation C:
1. Screen is in portrait mode. vc is in portrait mode.
2. vc presents lvc in landscape mode.
3. Lock rotation.
4. lvc changes to portrait mode.
5. Dismissing lvc returns to vc in portrait mode.

Variation D:
1. Lock rotation.
2. Screen is in portrait mode. vc is in portrait mode.
3. vc presents lvc still in *landscape* mode. (Inconsistent with C, also feels wrong.)
4. Dismissing lvc returns to vc in portrait mode.

Variation E:
1. Lock rotation.
2. Screen is in portrait mode. vc is in portrait mode.
3. vc presents lvc still in *landscape* mode. (Inconsistent with C, also feels wrong.)
4. Press power button to lock screen.
5. Unlock screen.
6. Dismissing lvc returns to vc in *landscape* mode. (Inconsistent with C, also feels incorrect)
7. You cannot even rotation vc back to portrait mode.

Sample code: http://cl.ly/381O2x2T3y0R

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!