title: Delegate methods are not called (transitioningDelegate)
body: <p>I'm trying to implement a custom transition between two viewControllers. (<strong>Swift 3.0</strong>)</p>
  
  <p>Between my two viewControllers I have a <code>UISegue</code> with the kind <code>show</code> (<code>animated = true</code>).</p>
  
  <p>So I set the delegate methods of <code>UIViewControllerTransitioningDelegate</code> in the extension of my first view controller :</p>
  
  <pre><code>extension DocumentsViewController : UIViewControllerTransitioningDelegate { ... }
  </code></pre>
  
  <p>And I also have implemented the required methods by the protocol : </p>
  
  <pre><code>animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -&gt; UIViewControllerAnimatedTransitioning? {
       ...
  }
  
  public func animationController(forDismissed dismissed: UIViewController) -&gt; UIViewControllerAnimatedTransitioning? {
       ...
  }
  </code></pre>
  
  <p>Now when the <code>segue</code> is perform, in the <code>firstViewController</code> I'm using the delegate method <code>prepareForSegue</code> to finally set the <code>transitioningDelegate</code> to my `secondViewController, see below : </p>
  
  <pre><code>public override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      super.prepare(for: segue, sender: sender)
      if let destination = segue.destination as? DocumentDetailViewController {
          destination.transitioningDelegate = self
      }
  }
  </code></pre>
  
  <p>I check with breakpoints, the delegate is well setted to my firstViewController.
  But the delegate methods of <code>transitioningDelegate</code> in my firstViewController are never fired, I don't know why.</p>
  
  <p>Any ideas ? </p>
  
  <p>PS : In my storyboard, my <code>segue have Animated to true</code>, so this should work, but it doesn't.</p>
  
  <p>Thanks.</p>
  
  <p><strong>SOLVED :</strong> A mix of MadreDeDios, Matt and Tushar answers.</p>
  
  <p><strong>1 :</strong> As I want to keep the navigation in my app, I have to make conform my first viewController to <code>UINavigationControllerDelegate</code> instead of <code>UIViewControllerTransitioningDelegate</code>. (see <strong>MadreDeDios answer's</strong>).</p>
  
  <p><strong>2 :</strong> According to this protocol, I have implemented the following delegate method : </p>
  
  <pre><code>public func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -&gt; UIViewControllerAnimatedTransitioning? {
  
  ...
  
  }
  </code></pre>
  
  <p><strong>3 :</strong> I set the delegate earlier at the <code>viewDidLoad()</code> of my <code>firstViewController</code> (see <strong>Matt's answer</strong>) :</p>
  
  <pre><code>override public func viewDidLoad() {
      super.viewDidLoad()
      //...
      self.navigationController?.delegate = self
  }
  </code></pre>
  
  <p><strong>4 :</strong>  I'm using a <strong>manual push</strong> instead of a segue to display my <code>secondViewController</code> (see <strong>Tushar's answer</strong>).</p>
  
  <p>Now this works, thank you.</p>