Custom .CurrentContext dismiss transition adds toView to the wrong superview

Originator:klaaspieter
Number:rdar://21944168 Date Originated:22-Jul-2015 01:51 PM
Status:Open Resolved:
Product:iOS SDK Product Version:8.0
Classification:Serious Bug Reproducible:Always
 
Summary:
When doing a custom .CurrentContext animation inside a container view (from a storyboard) the presentation transition adds the presented view controller's view (fromView) to a `UITransitionView`. 

When dismissing the presented view controller the toView should be added to the `UITransitionView`, which is cleaned up after the transition finishes. During this cleanup the toView is taken from the `UITransitionView` and added back at the wrong place in the view hierarchy.

It should be added back as a subview of the container view (from which it came), instead it appears to be added as a subview of the rootViewController's transitionView.

Steps to Reproduce:
1. Have a view controller with a custom .CurrentContext transition
2. Present the view controller using the custom transition
3. Dismiss the view controller

Expected Results:
The view hierarchy to be restored to the state it was in before the presentation (or the visual equivalent of that).

Actual Results:
The view hierarchy ends up with the toView at the wrong place.

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!