title: UIPageViewController check when swiped back or forward
body: <p>I want to keep track of the index using the <code>UIPageViewController</code>. Whenever I swipe I need to <code>index++</code> or <code>index--</code>. This delegate method gets called whenever you swipe back or further:</p>
  
  <pre><code>- (void)pageViewController:(UIPageViewController *)pvc didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed
  {
      // If the page did not turn
      if (!completed)
      {
          // You do nothing because whatever page you thought
          // the book was on before the gesture started is still the correct page
          return;
      }
  
      // I want to check here whenever the page was swiped back or further
  }
  </code></pre>
  
  <p>How do I check in this method if the user swiped back or further? I know there are the 2 DataSource methods "viewControllerAfterViewController" and "viewControllerBeforeViewController" but I cannot check if the page transition has completed (and I can do this in the above method) any idea how I could know if the user swiped back or further in the above method?</p>