title: Type 'AnimationController' does not conform to protocol 'UIViewControllerAnimatedTransitioning'
body: <pre><code>import Foundation
  import UIKit
  
  enum TransitionType {
     case Presenting, Dismissing
  }
  
  class AnimationController: NSObject, UIViewControllerAnimatedTransitioning {
     var duration: NSTimeInterval
     var isPresenting: Bool
     var originFrame: CGRect
  
     init(withDuration duration: NSTimeInterval, forTransitionType type: TransitionType, originFrame: CGRect) {
        self.duration = duration
        self.isPresenting = type == .Presenting
        self.originFrame = originFrame
  
        super.init()
     }
  
     func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -&gt; NSTimeInterval {
         return self.duration
     }
  }
  </code></pre>
  
  <p>The code was adapted from the below tutorial:</p>
  
  <ul>
  <li><a href="https://code.tutsplus.com/tutorials/how-to-create-custom-view-controller-transitions-and-animations--cms-25716" rel="nofollow">How to Create Custom View Controller Transitions and Animations</a> </li>
  </ul>