Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@objc func didPinchView(gestureRecognizer: UIPinchGestureRecognizer) {
if gestureRecognizer.state == .began || gestureRecognizer.state == .changed {
guard let transform = gestureRecognizer.view?.transform else { return }
let scale = gestureRecognizer.scale
gestureRecognizer.view?.transform = transform.scaledBy(x: scale, y: scale)
gestureRecognizer.scale = 1.0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.