Skip to content

Instantly share code, notes, and snippets.

@Pym
Created September 16, 2015 12:01
Show Gist options
  • Save Pym/b4fbda0b250ad67a430f to your computer and use it in GitHub Desktop.
Save Pym/b4fbda0b250ad67a430f to your computer and use it in GitHub Desktop.
func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldBeRequiredToFailByGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if let swipeRec = gestureRecognizer as? UISwipeGestureRecognizer {
if let panRec = otherGestureRecognizer as? UIPanGestureRecognizer {
return true
}
} else if let panRec = gestureRecognizer as? UIPanGestureRecognizer {
if let tapRec = otherGestureRecognizer as? UITapGestureRecognizer {
return true
}
}
return false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment