Skip to content

Instantly share code, notes, and snippets.

@alsedi
Created September 1, 2016 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alsedi/657fd0fb85b34da53025c40a0e4e2d6f to your computer and use it in GitHub Desktop.
Save alsedi/657fd0fb85b34da53025c40a0e4e2d6f to your computer and use it in GitHub Desktop.
let center = CGPoint(x: bounds.midX, y: bounds.midY)
var transform = CGAffineTransform.identity
transform = transform.translatedBy(x: center.x, y: center.y)
transform = transform.rotated(by: -CGFloat(M_PI_2 + M_PI_4))
transform = transform.translatedBy(x: -center.x, y: -center.y)
circle.apply(transform)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment