Last active
July 20, 2017 09:39
-
-
Save lukevella/52f1013c2153281ff4f633434c1b02af to your computer and use it in GitHub Desktop.
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
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