             attribute: .NotAnAttribute, 
             multiplier: 1, 
             constant: 29)
-        view.addConstraints([segmentedTopPaddingConstraint,
+        view.addConstraints([
+            segmentedTopPaddingConstraint,
             segmentedRightPaddingConstraint,
             segmentedLeftPaddingConstraint,
-            segmentedBottomPaddingToPageViewControllerConstraint])
+            segmentedBottomPaddingToPageViewControllerConstraint
+            ])
+        
         segmentedControl.addConstraint(segmentedHeighConstraint)
         
         view.bindFrameToSuperviewBounds()
+        view.layoutIfNeeded()
         return view
     }
     

        
        
        pageViewController = UIPageViewController(transitionStyle: .Scroll, navigationOrientation: .Horizontal, options: nil)
        pageViewControllerView.addSubview(pageViewController.view)
        pageViewController.view.bindFrameToSuperviewBounds()
        
        pageViewControllerView.layoutIfNeeded()
    }
    
    func loadViewFromNib() -> UIView {
        let view = UIView(frame: CGRect(x: 0, y: 0, width: 375, height: 667))
        view.frame = bounds
        view.backgroundColor = UIColor.whiteColor()
        view.translatesAutoresizingMaskIntoConstraints = false
        addSubview(view)

    var segmentedLeftPaddingConstraint: NSLayoutConstraint!
    var segmentedRightPaddingConstraint: NSLayoutConstraint!
    var segmentedBottomPaddingToPageViewControllerConstraint: NSLayoutConstraint!
    
    func configure(owner:UIViewController, segments:[KZSegment]) {
        owner.addChildViewController(pageViewController)
        self.segments = segments
    }
    
    
    @IBInspectable public var scHeight:CGFloat = 29 {
