             title = viewController.title
           }
 
+          if let pageControl = pageControl {
+            pageControl.currentPage = currentIndex
+          }
+
           pagesDelegate?.pageViewController(self, setViewController: pages[currentIndex], atPage: currentIndex)
       }
     }

    return view
    }()

  public convenience init(_ pages: [UIViewController],
    transitionStyle: UIPageViewControllerTransitionStyle = .Scroll,
    navigationOrientation: UIPageViewControllerNavigationOrientation = .Horizontal,

    addConstraints()
    view.bringSubviewToFront(bottomLineView)
    goTo(startPage)
  }

  public override func viewDidAppear(animated: Bool) {
    super.viewDidAppear(animated)

    for subview in view.subviews {
      if subview is UIPageControl {
        pageControl = subview as? UIPageControl
      }
    }
  }
}

