 //
 //  KWStepper.swift
 //  Created by Kyle Weiner on 10/17/14.
-//  Copyright (c) 2014 Kyle Weiner. All rights reserved.
+//  https://github.com/kyleweiner/KWStepper
 //
 
 import UIKit

        self.incrementButton.addGestureRecognizer(UILongPressGestureRecognizer(target: self, action: "didLongPress:"))
    }

    required public init(coder: NSCoder) {
        fatalError("KWStepper: NSCoding is not supported!")
    }

    // MARK: KWStepper

    public func decrementValue() {
        switch value - decrementStepValue {
        case let x where wraps && x < minimumValue:
            value = maximumValue
        case let x where x >= minimumValue:
            value = x
        default:
            endLongPress()
            delegate?.KWStepperMinValueClamped?()
            maxValueClampedCallback?()
        }
    }

    public func incrementValue() {
        switch value + incrementStepValue {
        case let x where wraps && x > maximumValue:
            value = minimumValue
        case let x where x <= maximumValue:
            value = x
        default:
            endLongPress()
            delegate?.KWStepperMaxValueClamped?()
            maxValueClampedCallback?()
        }
    }

    // MARK: User Interaction

    public func didLongPress(sender: UIGestureRecognizer) {
        if !autoRepeat {

        }
    }

    /// Must be less than maximumValue. Default = 0.
    public var minimumValue: Double = 0 {
        willSet {
            assert(newValue < maximumValue, "\(self.dynamicType): minimumValue must be less than maximumValue.")
        }
    }

    /// Must be less than minimumValue. Default = 100.
    public var maximumValue: Double = 100 {
        willSet {
            assert(newValue > minimumValue, "\(self.dynamicType): maximumValue must be greater than minimumValue.")
        }
    }

    /// The value to step when incrementing. Must be greater than 0. Default = 1.
    public var incrementStepValue: Double = 1 {
        willSet {
            assert(newValue > 0, "\(self.dynamicType): incrementStepValue must be greater than zero.")
        }
    }

    /// The value to step when decrementing. Must be greater than 0. Default = 1.
    public var decrementStepValue: Double = 1 {
        willSet {
            assert(newValue > 0, "\(self.dynamicType): decrementStepValue must be greater than zero.")
        }
    }

    /// Executed when the value is changed.
    public var valueChangedCallback: (() -> ())?

    /// Executed when the value is decremented.
    public var decrementCallback: (() -> ())?

    /// Executed when the value is incremented.
    public var incrementCallback: (() -> ())?

    /// Executed when the max value is clamped.
    public var maxValueClampedCallback: (() -> ())?

    /// Executed when the min value is clamped.
    public var minValueClampedCallback: (() -> ())?

    public var delegate: KWStepperDelegate? = nil

    // MARK: - Private Variables

    private var longPressTimer: NSTimer?

    // MARK: - Initialization

    public init(decrementButton: UIButton, incrementButton: UIButton) {
        self.decrementButton = decrementButton
