Skip to content

Instantly share code, notes, and snippets.

@issuran
Last active August 29, 2018 17:19
Show Gist options
  • Save issuran/4aa737133ed4ba9d292655ccc966d3ba to your computer and use it in GitHub Desktop.
Save issuran/4aa737133ed4ba9d292655ccc966d3ba to your computer and use it in GitHub Desktop.
Turn UIButton Upside down - Turn 180º and back again - Swift 4
// Turn UIButton 180º
UIButton.transform = CGAffineTransform(rotationAngle: CGFloat(Double.pi))
// Turn UIButton 0º or back again
UIButton.transform = CGAffineTransform(rotationAngle: 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment