 import UIKit
 
 @IBDesignable
-public class ThumbSliderView: UIView {
+public class ThumbSliderView: UIControl {
     
     @IBOutlet private(set) weak var backgroundView: UIView!
     @IBOutlet private(set) weak var thumbView: UIImageView!

    @IBOutlet private(set) weak var backgroundInformationalLabel: UILabel!
    @IBOutlet private weak var backgroundLeadingConstraint: NSLayoutConstraint!

    @IBInspectable var thumbViewImage: UIImage? {
        get { return thumbView.image }
        set { thumbView.image = newValue }

            // the user's pan gesture
            let translation = recognizer.translationInView(self)
            backgroundLeadingConstraint.constant = max(translation.x, 0)
            updateValue()
            
        case .Ended, .Cancelled, .Failed:
            // Determine whether the user slid the slider far enough to
            // either have the slider finish to the end position or slide
            // back to the start position
            let startValue = value
            let shouldSlideToEnd = startValue > 0.5
            
            DisplayLinkProgressor.run(withDuration: 0.10, update: { (progress) in
                let finalValue = shouldSlideToEnd ? 1.0 : 0.0
                let nextValue = startValue + progress * (finalValue - startValue)
                
                self.value = nextValue
            })
        }
    }
