     var items = [YSSegmentedControlItem]()
     var selector = UIView()
     var bottomLine = CALayer()
+    
+    fileprivate var selectorLeadingConstraint: NSLayoutConstraint?
+    fileprivate var selectorWidthConstraint: NSLayoutConstraint?
     
     // MARK: Init
     

        // bottom line
        bottomLine.backgroundColor = appearance.bottomLineColor.cgColor
        layer.addSublayer(bottomLine)
        // selector
        selector.backgroundColor = appearance.selectorColor
        addSubview(selector)
        
        selectItem(at: selectedIndex, withAnimation: true)
        

            y: frame.size.height - appearance.bottomLineHeight,
            width: frame.size.width,
            height: appearance.bottomLineHeight)
    }
    
    private func defaultAppearance() {
