We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 }
@objc func pinchAction(sender:UIPinchGestureRecognizer) { let scale:CGFloat = previousScale * sender.scale self.view.transform = CGAffineTransform(scaleX: scale, y: scale); previousScale = sender.scale }
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 !
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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 }
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 !
The text was updated successfully, but these errors were encountered: