Skip to content

Instantly share code, notes, and snippets.

@DonMag
Last active August 29, 2015 14:25
Show Gist options
  • Save DonMag/38672205e7dd7bac2791 to your computer and use it in GitHub Desktop.
Save DonMag/38672205e7dd7bac2791 to your computer and use it in GitHub Desktop.
// Note: this will only rotate it 180 degrees, once
UIView.animateWithDuration(1.0,
animations: {self.arrowImageView.transform = CGAffineTransformMakeRotation(CGFloat(M_PI))}
)
// Note: this will rotate it 180 degrees, each time it's called
UIView.animateWithDuration(1.0,
animations: {self.arrowImageView.transform = CGAffineTransformRotate(self.arrowImageView.transform, CGFloat(M_PI))}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment