I'm interested in a concise example of how to create an NSObject
subclass that implements the UIViewControllerInteractiveTransitioning
protocol to manage a custom interactive transition between two UIViewController
s. Ideally in response to a swipe gesture. Something akin to the iOS7 default interactive swipe that now comes with UINavigationController
, but a custom/manual implementation example of this.
I've read the docs:
- UIViewControllerContextTransitioning
- UIPercentDrivenInteractiveTransition
- UIViewControllerInteractiveTransitioning
- UIViewControllerAnimatedTransitioning
And looked at a few examples elsewhere:
- one
- two
- three
- four (I set this up but it's more about
UIViewController
containment
and manual implementation of these transitions rather thanUIViewControllerInteractiveTransitioning
The docs are fairly clear but dont reference sample code. And the examples leave a little to be desired (unanswered questions about how the various pieces are tied together).
So my questions are:
- Can someone help fill in the blanks about how to tie a gesture (e.g. a swipe) to the object that implements the
UIViewControllerInteractiveTransitioning
protocol? - What is the relationship between object implementing the UIViewControllerInteractiveTransitioning protocol and that implementing the UIViewControllerAnimatedTransitioning protocol? Seems like you must have both to trigger interactive transitions...
Thanks in advance...