 import UIKit
+
+@objc(HYPPagesControllerDelegate) public protocol PagesControllerDelegate {
+
+  func pageViewController(pageViewController: UIPageViewController, setViewController viewController: UIViewController, atPage page: Int)
+}
 
 @objc(HYPPagesController) public class PagesController: UIPageViewController, UIPageViewControllerDelegate, UIPageViewControllerDataSource {
 

      setViewControllers([viewController],
        direction: .Forward,
        animated: true,
        completion: nil)
      if setNavigationTitle {
        title = viewController.title
      }
    }
  }

      currentIndex = index
      setViewControllers([viewController],
        direction: direction,
        animated: true,
        completion: {
          [unowned self] (finish: Bool) -> Void in
          self.pagesDelegate?.pageViewController(self,
            setViewController: viewController,
            atPage: currentIndex)
        })
      if setNavigationTitle {
        title = viewController.title
      }
