 */
 
 import UIKit
-
 
 @IBDesignable public class MVHorizontalPicker: UIControl {
     

    
    private func updateSelectedIndex(selectedItemIndex: Int, animated: Bool) {
        
        let offset = CGPoint(x: CGFloat(selectedItemIndex) * scrollView.frame.width, y: 0)
        scrollView.setContentOffset(offset, animated: animated)
        
        updateSelection(selectedItemIndex, previousItemIndex: previousItemIndex)
        
        previousItemIndex = selectedItemIndex
    }
    
}

extension MVHorizontalPicker: UIScrollViewDelegate {

    }
    
    public override func layoutSubviews() {
        super.layoutSubviews()
        updateGradient(frame: self.bounds, edgesGradientWidth: edgesGradientWidth)
    }
    
