Created
May 9, 2020 12:08
-
-
Save stevencurtis/41ec0b63a54ec4258f416f321d414344 to your computer and use it in GitHub Desktop.
motionended
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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