Skip to content

Instantly share code, notes, and snippets.

@lukevella
Last active July 20, 2017 09:39
Show Gist options
  • Save lukevella/52f1013c2153281ff4f633434c1b02af to your computer and use it in GitHub Desktop.
Save lukevella/52f1013c2153281ff4f633434c1b02af to your computer and use it in GitHub Desktop.
func rotate(degress: Double) {
UIView.animate(
withDuration: 0.1,
delay: 0,
options: [.beginFromCurrentState, .curveEaseOut, .allowUserInteraction],
animations: {
self.transform = CGAffineTransform(rotationAngle: CGFloat(degrees.toRadians()))
},
completion: nil
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment