     }
 }
 
+// MARK: - UIPageViewControllerDelegate
 extension KZSegmentedPageView: UIPageViewControllerDelegate {
     public func pageViewController(_ pageViewController: UIPageViewController, willTransitionTo pendingViewControllers: [UIViewController]) {
         if let firstViewController = pendingViewControllers.first,

    }
}

extension KZSegmentedPageView: UIPageViewControllerDataSource {
    public func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -> UIViewController? {
        guard let viewControllerIndex = segments.index(where: { $0.viewController == viewController }) else {

    
    @IBInspectable open var scHeight: CGFloat = 29 {
        didSet {
            self.segmentedHeighConstraint.constant = self.scHeight
            self.view.layoutIfNeeded()
        }
    }
    
    @IBInspectable open var scPaddingLeft: CGFloat = 8 {
        didSet {
            self.segmentedLeftPaddingConstraint.constant = self.scPaddingLeft
            self.view.layoutIfNeeded()
        }
    }
    
    @IBInspectable open var scPaddingRight: CGFloat = 8 {
        didSet {
            self.segmentedRightPaddingConstraint.constant = self.scPaddingRight
            self.view.layoutIfNeeded()
        }
    }
    
    @IBInspectable open var scPaddingTop: CGFloat = 8 {
        didSet {
            self.segmentedTopPaddingConstraint.constant = self.scPaddingTop
            self.view.layoutIfNeeded()
        }
    }
    
    @IBInspectable open var scPaddingBottom: CGFloat = 8 {
        didSet {
            self.segmentedBottomPaddingToPageViewControllerConstraint.constant = self.scPaddingBottom
            self.view.layoutIfNeeded()
        }
    }
    
    @IBInspectable open var scTintColor: UIColor = UIColor(colorLiteralRed: 0, green: 122/255, blue: 1, alpha: 1) {
        didSet {
            self.segmentedControl.tintColor = self.scTintColor
        }
    }
    
    @IBInspectable open var scBackgroundColor: UIColor = UIColor.clear {
        didSet {
            self.segmentedControl.backgroundColor = self.scBackgroundColor
            self.segmentedControl.clipsToBounds = true
            self.segmentedControl.layer.cornerRadius = 4
        }
    }
    
    @IBInspectable open var viewBackgroundColor: UIColor = UIColor.white {
        didSet {
            self.view.backgroundColor = self.viewBackgroundColor
        }
    }
    
