Can I get the middle point coordinate of the UIRotationGestureRecognizer's two fingers? Or the location of each finger? Thank you.
You can get either.
The docs for UIRotationGestureRecognizer show the properties velocity and rotation.
This is specific to the rotation.
But you can use these methods from the UIGestureRecognizer...
Getting the Touches and Location of a Gesture
– locationInView:
– locationOfTouch:inView:
– numberOfTouches
To get the touches and locations.
From these you can easily calculate the mid point.
UIRotationGestureRecognizer extends UIGestureRecognizer which has the two methods: numberOfTouches and locationOfTouch:inView:. Use these to get the location of each finger. From there you can calculate a center.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With