   override func viewDidLoad() {
     super.viewDidLoad()
 
+    layout()
+
+    dataSource = self
+    delegate = self
     setViewControllers([pages.first!], direction: .forward, animated: true,
                        completion: nil)
 
-    layout()
+    control.currentPage = 1
+    control.numberOfPages = pages.count
   }
 
   private func layout() {


  @objc
  func `continue`(sender: UIButton!) {
    guard let viewController = self.viewControllers?.first,
      let index = self.pages.firstIndex(of: viewController),
    index < self.pages.count else {
        return
    }

    // complete
    if index == self.pages.count - 1 {
      UserInfo.onboardingComplete = true
      AppController.shared.transition(to: .navigation)
      return
    }

    // continue
    setViewControllers([self.pages[index + 1]], direction: .forward,
                       animated: true, completion: nil)
    control.currentPage = index + 1

    if index + 1 == pages.count - 1 {
      self.btnSkip.isHidden = true
      self.btnContinue.setTitle(Strings.Onboarding.begin, for: .normal)
      self.btnContinue.setTitleColor(Style.Colors.white, for: .normal)
      self.btnContinue.backgroundColor = Style.Colors.green
    }
  }

  @objc


    self.view.addSubviews([control, btnContinue, btnSkip])

    control.currentPageIndicatorTintColor = Style.Colors.green
    control.pageIndicatorTintColor = Style.Colors.grey
    control.snp.makeConstraints { (make) in
      make.centerX.equalToSuperview()
