             pageControl.currentPage = currentIndex
           }
 
-          pagesDelegate?.pageViewController(self, setViewController: pages[currentIndex], atPage: currentIndex)
+          setViewController(pages[currentIndex], atPage: currentIndex)
       }
     }
   }

  public private(set) var currentIndex = 0

  public var pagesDelegate: PagesControllerDelegate?

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

// MARK: Private methods

extension PagesController {

  func setViewController(viewController: UIViewController, atPage page:Int) {
    pagesDelegate?.pageViewController(self,
      setViewController: viewController,
      atPage: page)
    if let pageChangeHandler = pageChangeHandler {
      pageChangeHandler(viewController: viewController, page: page)
    }
  }

  func viewControllerIndex(viewController: UIViewController) -> Int? {
    return find(pages, viewController)
