Skip to content

Commit

Permalink
Adds direction variable to SwipeAction
Browse files Browse the repository at this point in the history
  • Loading branch information
traviskirton committed Jul 25, 2015
1 parent ec3e5a2 commit f966374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions C4/UI/UIGestureRecognizer+Closure.swift
Expand Up @@ -314,7 +314,7 @@ extension UILongPressGestureRecognizer {
}


public typealias SwipeAction = (location: C4Point, state: UIGestureRecognizerState) -> ()
public typealias SwipeAction = (location: C4Point, state: UIGestureRecognizerState, direction: UISwipeGestureRecognizerDirection) -> ()

extension UISwipeGestureRecognizer {
/**
Expand Down Expand Up @@ -355,7 +355,7 @@ extension UISwipeGestureRecognizer {
}

func handleGesture(gestureRecognizer: UISwipeGestureRecognizer) {
action(location: gestureRecognizer.location, state: gestureRecognizer.state)
action(location: gestureRecognizer.location, state: gestureRecognizer.state, direction: gestureRecognizer.direction)
}
}
}
Expand Down

0 comments on commit f966374

Please sign in to comment.