      - returns: Returns `0.0` if either `direction` (or the `initialDirection` fallback) or `view` are `nil`. Else, takes the current `translationInView()` and simplfies it down to the specified `direction`. For example, if `direction` is `.Left`, and the translation is `CGPoint(x: 3.0, y: 4.0)`, the function returns `3.0`.
      */
     
-    func translation(inDirection direction: Direction? = nil) -> CGFloat {
+    public func translation(inDirection direction: Direction? = nil) -> CGFloat {
         guard let direction = direction ?? initialDirection, view = view else {
             return 0.0
         }

import UIKit.UIGestureRecognizerSubclass

/// Extension of `UIGestureRecognizerDelegate` which allows the delegate to receive messages when the pan gesture recognizer starts, updates, cancels, and finishes. The `delegate` property can be set to a class implementing `DirectedPanGestureRecognizerDelegate` and it will receive these messages.
@objc protocol DirectedPanGestureRecognizerDelegate: UIGestureRecognizerDelegate {
    
    /// Called when the pan gesture recognizer starts.
    optional func directedPanGestureRecognizerDidStart(gestureRecognizer: DirectedPanGestureRecognizer)

    // MARK: Configuration
    
    /// Minimum translation (in `initialDirection`) required for the gesture to finish. Defaults to `0.0`.
    @IBInspectable public var minimumTranslation: CGFloat = 0.0
    
    /// Minimum velocity (in `initialDirection`) required for the gesture to finish. Defaults to `0.0`.
    @IBInspectable public var minimumVelocity: CGFloat = 0.0
    
    // MARK: Internal variables
    
    /// The current location in `view` when the pan gesture recognizer begins. Defaults to `nil`. Resets to `nil` when `reset()` is called.
    public private(set) var initialLocation: CGPoint?
    
    /// The current direction in `view` when the pan gesture recognizer begins. Defaults to `nil`. Resets to `nil` when `reset()` is called.
    public private(set) var initialDirection: Direction?
    
    // MARK: Delegation
    
    public override var delegate: UIGestureRecognizerDelegate? {
        didSet {
            self.addTarget(self, action: "onPan")
        }
    }
    
    internal var directedPanDelegate: DirectedPanGestureRecognizerDelegate? {
        return delegate as? DirectedPanGestureRecognizerDelegate
    }
    
    // MARK: Initialization
    
    /// Initialize the pan gesture recognizer with no target or action set.
    public convenience init() {
        self.init(target: nil, action: nil)
    }
    
    // MARK: Overrides
    
    public override func reset() {
        super.reset()
        
        initialLocation = nil
