Unable to present a custom full-screen view controller over an iPad form sheet

Originator:scelis
Number:rdar://15124613 Date Originated:01-Oct-2013 04:14 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification:UI/Usability Reproducible:Always
 
Summary:
Using the new iOS 7 UIViewControllerAnimatedTransitioning API, I would like to be able to present a modal full-screen view controller from anywhere in the app. This view controller would function like a UIAlertView, but use the UIViewController APIs, which would be nice and would allow us to replicate UIAlertView without mucking with UIWindows.

However, this does not seem to be possible with the current API. The main issue is the conflict between UIModalPresentationCustom and UIModalPresentationFullScreen. We have to use UIModalPresentationCustom to ensure that the presenting view controller remains onscreen after the transition and is not removed from the view hierarchy. However, using UIModalPresentationCustom means that the containerView for the transition and animation is the parent view controller. So, if you have already presented something with UIModalPresentationPageSheet or UIModalPresentationFormSheet, then there is no way to present another full-screen view controller on top of those with UIModalPresentationCustom, leaving the presenter on-screen after the transition.

For example, imagine a custom UIAlertView that is almost full-screen but is partially translucent so that you can see the rest of the app behind it. Doing that with a UIViewController and the new UIViewControllerAnimatedTransitioning is currently not possible as far as I can tell due to the reasons above.

Steps to Reproduce:
1. Launch an iPad app.
2. Present a view controller with UIModalPresentationFormSheet.
3. Have that form sheet view controller present a view controller with UIModalPresentationCustom.
4. Attempt to have that final view controller take up most of the screen, be partially translucent, and see the preseting view controller behind it.

Expected Results:
I expect the final view controller to take up most of the screen, be partially translucent, and see the preseting view controller behind it.

Actual Results:
Instead, the final view controller can only take up as much space as the form sheet that presented it. There is no way to make it full screen without using UIModalPresentationFullScreen, which then causes the presenting view controller to be removed from the view hierarchy after the transition.

Version:
iOS 7.0.2

Notes:
Please see the attached sample code for a reproducible test case.

Configuration:


Attachments:
'SampleModalTransition.zip' was 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!