 
     // MARK: - Lifecycle
 
-    override init(frame: CGRect) {
+    override public init(frame: CGRect) {
         super.init(frame: frame)
         setupView()
     }
 
-    required init?(coder: NSCoder) {
+    required public init?(coder: NSCoder) {
         super.init(coder: coder)
         setupView()
     }


    // MARK: - Layout

    override func layoutSubviews() {
        super.layoutSubviews()

        layer.cornerRadius = cornerRadius ?? frame.height / 2


// MARK: - AnimatedSegmentSwitch

@IBDesignable public class AnimatedSegmentSwitch: UIControl {

    // MARK: - Public Properties

    public var items: [String] = ["Item 1", "Item 2", "Item 3"] {
        didSet {
            setupLabels()
        }
    }

    public var selectedIndex: Int = 0 {
        didSet {
            displayNewSelectedIndex()
        }
    }

    public var animationDuration: NSTimeInterval = 0.5
    public var animationSpringDamping: CGFloat = 0.6
    public var animationInitialSpringVelocity: CGFloat = 0.8

    // MARK: - IBInspectable Properties

    @IBInspectable public var selectedTitleColor: UIColor = UIColor.blackColor() {
        didSet {
            setSelectedColors()
        }
    }

    @IBInspectable public var titleColor: UIColor = UIColor.whiteColor() {
        didSet {
            setSelectedColors()
        }
    }

    @IBInspectable public var font: UIFont! = UIFont.systemFontOfSize(12) {
        didSet {
            setFont()
        }
    }

    @IBInspectable public var borderColor: UIColor = UIColor.whiteColor() {
        didSet {
            layer.borderColor = borderColor.CGColor
        }
    }

    @IBInspectable public var cornerRadius: CGFloat! {
        didSet {
            layer.cornerRadius = cornerRadius
        }
    }

    @IBInspectable public var thumbColor: UIColor = UIColor.whiteColor() {
        didSet {
            setSelectedColors()
        }
    }

    @IBInspectable public var thumbCornerRadius: CGFloat! {
        didSet {
            thumbView.layer.cornerRadius = thumbCornerRadius
        }
    }

    @IBInspectable public var thumbInset: CGFloat = 2.0 {
        didSet {
            setNeedsLayout()
        }
