         direction: .Forward,
         animated: true,
         completion: { [unowned self] finished in
-          if finished {
-            self.setViewController(viewController, atPage: self.currentIndex)
-          }
+          self.pagesDelegate?.pageViewController(self,
+            setViewController: viewController,
+            atPage: self.currentIndex)
         })
       if setNavigationTitle {
         title = viewController.title

        direction: direction,
        animated: true,
        completion: { [unowned self] finished in
          if finished {
            self.setViewController(viewController, atPage: self.currentIndex)
          }
        })
      if setNavigationTitle {
        title = viewController.title

  public private(set) var currentIndex = 0

  public var pagesDelegate: PagesControllerDelegate?

  public private(set) lazy var bottomLineView: UIView = {
    let view = UIView()
