Adaptive modal presentation styles can cause the modal presentation stack to end up in the wrong order.

Originator:wlisac
Number:rdar://23956865 Date Originated:12/18/2015
Status:Open Resolved:
Product:iOS Product Version:iOS 9.2
Classification:Other Bug Reproducible:Always
 
Summary:
The modal presentation stack can end up in the wrong order after adapting to a different presentation style when a custom presentation controller is involved in the modal presentation stack.

Steps to Reproduce:
Follow these steps using an iPad that supports spit view.

1) Present a modal view controller with a custom presentation controller
2) Present a modal view controller with a modal presentation style of `UIModalPresentationFormSheet` (no custom presentation controller needed)
3) Present a modal view controller (no custom presentation controller needed)
4) Adapt to/from full screen to force the form sheet to adapt presentation styles

Expected Results:
I expect the view controllers to still be presented in order. The visible order should be:

1) custom presentation controller
2) form sheet
3) standard view controller

Actual Results:
The visible order is wrong. It is:

1) custom presentation controller
2) standard view controller
3) form sheet

This can leave the application in an unrecoverable state.

Version:
iOS 9.2

Notes:
This appears to happen with any standard adaptivity. For example, using a popover instead of a form sheet causes the exact same issue.

Configuration:
iPad Air 2 (device or simulator)

Attachments:
'sad-modal.zip' and 'sad-modal.mov' were successfully uploaded.

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!