Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created May 9, 2020 12:08
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 stevencurtis/41ec0b63a54ec4258f416f321d414344 to your computer and use it in GitHub Desktop.
Save stevencurtis/41ec0b63a54ec4258f416f321d414344 to your computer and use it in GitHub Desktop.
motionended
override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
if motion == .motionShake {
shakeCounter += 1
shakeLabel.text = "Shaken \(shakeCounter) times"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment