     
     public override func viewWillLayoutSubviews() {
         super.viewWillLayoutSubviews()
-        selectionButtonsContainerView.translatesAutoresizingMaskIntoConstraints = false
+        buttonsScrollView.translatesAutoresizingMaskIntoConstraints = false
         let pageViewControllerView = pageViewController.view
         pageViewControllerView.translatesAutoresizingMaskIntoConstraints = false
         
         
         NSLayoutConstraint.activateConstraints([
-            NSLayoutConstraint(item: selectionButtonsContainerView, attribute: .CenterX, relatedBy: .Equal, toItem: self.view, attribute: .CenterX, multiplier: 1, constant: 0),
-            NSLayoutConstraint(item: selectionButtonsContainerView, attribute: .Top, relatedBy: .Equal, toItem: self.topLayoutGuide, attribute: .Bottom, multiplier: 1, constant: 0),
-            NSLayoutConstraint(item: selectionButtonsContainerView, attribute: .Height, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: appearance.button.buttonsHeight),
-            NSLayoutConstraint(item: selectionButtonsContainerView, attribute: .Width, relatedBy: .Equal, toItem: self.view, attribute: .Width, multiplier: 1, constant: 0)
+            NSLayoutConstraint(item: buttonsScrollView, attribute: .CenterX, relatedBy: .Equal, toItem: self.view, attribute: .CenterX, multiplier: 1, constant: 0),
+            NSLayoutConstraint(item: buttonsScrollView, attribute: .Top, relatedBy: .Equal, toItem: self.topLayoutGuide, attribute: .Bottom, multiplier: 1, constant: 0),
+            NSLayoutConstraint(item: buttonsScrollView, attribute: .Height, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: 30),
+            NSLayoutConstraint(item: buttonsScrollView, attribute: .Width, relatedBy: .Equal, toItem: self.view, attribute: .Width, multiplier: 1, constant: 0)
             ])
         
         // layout pageViewController
         NSLayoutConstraint.activateConstraints([
             NSLayoutConstraint(item: pageViewControllerView, attribute: .CenterX, relatedBy: .Equal, toItem: self.view, attribute: .CenterX, multiplier: 1, constant: 0),
-            NSLayoutConstraint(item: pageViewControllerView, attribute: .Top, relatedBy: .Equal, toItem: selectionButtonsContainerView, attribute: .Bottom, multiplier: 1, constant: 0),
+            NSLayoutConstraint(item: pageViewControllerView, attribute: .Top, relatedBy: .Equal, toItem: buttonsScrollView, attribute: .Bottom, multiplier: 1, constant: 0),
             NSLayoutConstraint(item: pageViewControllerView, attribute: .Bottom, relatedBy: .Equal, toItem: self.bottomLayoutGuide, attribute: .Top, multiplier: 1, constant: 0),
             NSLayoutConstraint(item: pageViewControllerView, attribute: .Width, relatedBy: .Equal, toItem: self.view, attribute: .Width, multiplier: 1, constant: 0)
             ])

        while nextIdx != idx  {
            nextIdx  += ((dir == .Forward) ? 1 : -1)
            dispatch_async(dispatch_get_main_queue(), { [weak self, nextIdx, vcs, dir] in
                guard let wself = self else { return }
                wself.pageViewController.setViewControllers([vcs[nextIdx]], direction: dir, animated: true) { (finished) in
                    if finished {
                        wself.currentIdx = nextIdx
                    }
                }
                })
        }
    }

    }
    
    public func updateSelectionIndicatorPosition(offsetX: CGFloat) {
        var frame = buttonsScrollView.selectionIndicatorFrame(currentIdx)
        guard let pageViewScrollView = pageViewScrollView else { return }
        frame.origin.x += ((offsetX - pageViewScrollView.frame.size.width) / pageViewScrollView.frame.size.width) * buttonsScrollView.appearance.button.width
        buttonsScrollView.selectionIndicator.frame = frame
    }
    
    // MARK: - Buttons
