Skip to content

Instantly share code, notes, and snippets.

@blixt
Created September 30, 2015 21:38
Show Gist options
  • Save blixt/2fb17d5c78a836af1b23 to your computer and use it in GitHub Desktop.
Save blixt/2fb17d5c78a836af1b23 to your computer and use it in GitHub Desktop.
override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) {
guard #available(iOS 9.0, *) else {
return
}
// MAX FORCE!
guard let maxForce = touches.maxElement({ $0.force < $1.force })?.force where maxForce > 3 else {
return
}
// Forceful touching is going on.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment