Ad

Our DNA is written in Swift
Jump

Radar: Transition Coordinator set too late to be useful for unwind segues

This is an enhancement request that came to me when pondering how to execute code following the dismissal of a modal view controller. It’s filed as rdar://17915792 and on Open Radar.

Summary

If you have a storyboard-driven unwind segue connected to an unwind IBAction there is no way to retrieve the transitionCoordinator for the unwind transition.

This would be beneficial to animate alongside the unwinding animation or execute code after the animation ended.

Steps to Reproduce

Create an app that shows a modal VC and has a button to trigger an unwinding.
in the unwinding IBAction inspect the passed UIStoryboardSegue

Expected Results:

  • the source and destination view controller’s transitionCoordinator should be set to the instance of the transition coordinator for the unwinding segue

Actual Results

  • the source and destination view controller’s transitionCoordinate is nil
  • the same is also true als in canPerformUnwindSegueAction:
  • there is no way to get hold of the relevant transitionCoordinator

Notes

This is the same on iOS 7. I believe that this is a general oversight since very few people understand unwind segues and instead keep using the dismissViewController methods programmatically.


Categories: Bug Reports

1 Comment »

Trackbacks

  1. Dismissal Completion Handler | Cocoanetics

Leave a Comment