Skip to content

Instantly share code, notes, and snippets.

@agammahajan1
Last active August 30, 2020 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agammahajan1/88782840456c2ed43534e7d947e91ab2 to your computer and use it in GitHub Desktop.
Save agammahajan1/88782840456c2ed43534e7d947e91ab2 to your computer and use it in GitHub Desktop.
@objc func didTapSnap(_ sender: UITapGestureRecognizer) {
let touchLocation = sender.location(ofTouch: 0, in: view)
if touchLocation.x < view.frame.width/2 {
changePlayer(forward: false)
}
else {
fillupLastPlayedSnap()
changePlayer(forward: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment