Incorrect Horizontal Size class with "present as popover" on iPhone 6+

Originator:oliver.drobnik
Number:rdar://18893122 Date Originated:6 November 2014
Status:Open Resolved:
Product:iOS Product Version:8.1 (12B411)
Classification:Serious Bug Reproducible:Always
 
Summary:
The segue style "Present as Popover" presents a view controller as modal full-screen or in a popover size permitting. This occurs on iPhone 6+ in landscape orientation and on iPad all the time.

If an iPhone 6+ is rotated to landscape and then this segue executed the presented VC gets an incorrect horizontal size class of Compact in the traitCollection. Only when you rotate the device to portrait and back to landscape this gets corrected to Regular.

This is a problem for the use case when you want to hide a navigation bar every time the VC is presented as a popover since you can dismiss the popover by tapping outside of it and don't need a Close button.

Steps to Reproduce:
1) Launch the provided sample app on iPhone 6+ (sim or device).

2) In Portrait tap on the Segue button. Note that the horizontal size class is Compact.

3) Rotate to landscape. Note that the second VC now gets presented as popover. Horizontal size class is now Regular.

4) The nav bar is now hidden, dismiss the bubble by tapping outside.

5)  In Landscape, tap on the Segue button. Note that the horizontal size class is now INCORRECTLY Compact.

Expected Results:
- The horizontal size class should be Regular when presented in a popover

Actual Results:
- The horizontal size class is Compact when presented with the iPhone 6+ in landscape
- The horizontal size class changes to Regular through rotating the device to portrait and then to landscape again

Version:
iOS 8.1 (12B411)

Notes:
A workaround is to correct the horizontal size class as shown in this gist: https://gist.github.com/Cocoanetics/9c5ec3b54eedf254d916

Comments

The sample app is the SizeClassBug project in my RadarSamples github repository: https://github.com/cocoanetics/radarsamples

By oliver.drobnik at Nov. 6, 2014, 12:40 p.m. (reply...)

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!