             y: frame.size.height - appearance.bottomLineHeight,
             width: frame.size.width,
             height: appearance.bottomLineHeight)
-        
-        let target = width * CGFloat(selectedIndex)
-        
-        selector.frame = CGRect (
-            x: target,
-            y: frame.size.height - appearance.selectorHeight,
-            width: width,
-            height: appearance.selectorHeight)
     }
     
     private func defaultAppearance() {

    var items = [YSSegmentedControlItem]()
    var selector = UIView()
    var bottomLine = CALayer()
    
    // MARK: Init
    

    }
    
    private func moveSelector(at index: Int, withAnimation animation: Bool) {
        layoutIfNeeded()

        if let selectorWidthConstraint = selectorWidthConstraint {
            removeConstraint(selectorWidthConstraint)
        }
        if let selectorLeadingConstraint = selectorLeadingConstraint {
            removeConstraint(selectorLeadingConstraint)
        }
        
        let item = items[selectedIndex]
        
        selectorLeadingConstraint = NSLayoutConstraint(item: selector,
                                                       attribute: .leading,
                                                       relatedBy: .equal,
                                                       toItem: item,
                                                       attribute: .leading,
                                                       multiplier: 1.0,
                                                       constant: 0)
        
        selectorWidthConstraint = NSLayoutConstraint(item: selector,
                                                     attribute: .width,
                                                     relatedBy: .equal,
                                                     toItem: item,
                                                     attribute: .width,
                                                     multiplier: 1.0,
                                                     constant: 0)
        
        self.addConstraints([self.selectorWidthConstraint!, self.selectorLeadingConstraint!])
        
        UIView.animate(withDuration: animation ? 0.3 : 0,
                       delay: 0,
                       usingSpringWithDamping: 1,
