title: How to implement interactive transitions in a custom container view controller
body: <p>I implemented my own custom container view controller and I try to make it compatible with iOS 7 view controller transitions. I make my custom container view controller conform to <code>UIViewControllerContextTransitioning</code> and I send <code>self</code> when I call <code>transitionDuration:</code> and <code>animateTransition:</code>. It all works fine as long as I use only animated transitions.</p>
  
  <p>Now I want to make it work with interactive transitions, so I call the interaction controller's <code>startInteractiveTransition:</code> instead of the animation controller's <code>animateTransition:</code>, using <code>self</code> again as a parameter. However, if I use a <code>UIPercentDrivenInteractiveTransition</code> as the interaction controller, it then calls a <code>_animator</code> method on my context (which is the container view controller itself). Of course, I haven't implemented this method which is private and undocumented, so it crashes...</p>
  
  <p>Am I missing something in my implementation? Is <code>UIPercentDrivenInteractiveTransition</code> only compatible with Apple classes because it uses some implementation magic (as when it requires that everything should be in a <code>UIView</code> animation block)? The documentation and header files make it look like we can implement our own container view controllers and still use custom transitions, but is it really true or just wishful thinking because nobody would actually do that?</p>
  
  <p>If I can't use <code>UIPercentDrivenInteractiveTransition</code>, then where exactly should the interaction/animation logic be? In the <code>UIViewControllerTransitionCoordinatorContext</code> object? In the <code>UIViewControllerInteractiveTransitioning</code> object (most likely, this object is the driver...)? Or in the <code>UIViewControllerAnimatedTransitioning</code> object (this is probably where the real animation should happen, but would that mean calling <code>animateTransition:</code> several times during the interaction? Or adding new methods for each step of the interactive transition?)</p>
  
  <p>Edit: The documentation says:</p>
  
  <blockquote>
    <p>A percent-driven interactive transition object drives the custom animation between the disappearance of one view controller and the appearance of another. It relies on a transition animator delegate—a custom object that adopts the <code>UIViewControllerAnimatorTransitioning</code> protocol—to set up and perform the animations.</p>
  </blockquote>
  
  <p>There is no <code>UIViewControllerAnimatorTransitioning</code> protocol. Assuming it is a mistake, or a name change that happened during iOS 7 development and it is actually the <code>UIViewControllerAnimatedTransitioning</code> protocol, how do we link the interaction controller with the animation controller? I guess it's the responsibility of the view controller driving the transition but I don't see any API to make this link, so it would mean that <code>UIPercentDrivenInteractiveTransition</code> is indeed reserved for Apple classes?</p>