Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Provides a CGAffineTransform suitable for flipping the Y Axis.
private func flipped(size: CGSize) -> CGAffineTransform {
let mirror = CGAffineTransform(scaleX: 1, y: -1)
let translate = CGAffineTransform(translationX: 0, y: size.height)
return mirror.concatenating(translate)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment