-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Hi I'm trying to make your view rotate & zoom.
For the zooming part I can implement the gesture in the viewDidLoad :
let gesture = UIPinchGestureRecognizer(target: self, action: #selector(pinchAction(sender:))) self.drawView.addGestureRecognizer(gesture)
and adding this function :
@objc func pinchAction(sender:UIPinchGestureRecognizer) { let scale:CGFloat = previousScale * sender.scale self.view.transform = CGAffineTransform(scaleX: scale, y: scale); previousScale = sender.scale }
- adding the variable
var previousScale:CGFloat = 1.0
but my strategy isn't working for the rotation (or translation ?) since it's not detecting this as a proper rotation event ?
Do you have any idea how to fix this ?
Thanks for you repo & awesome work by the way !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels