Quote:
Originally Posted by mitchsamuels
Hello, I have an image on my view that is draggable. How can I make it so the user is able to resize the image on the screen by pinching.
|
Easiest way to do that is to use UIGestureRecognizer. That is new to iPhone OS 3.2 (or iOS4 for iPhones).
Basically, you make a UIPinchGestureRecognizer and add it to your view, and in UIGestureRecognizer you register for a callback. When that is done, when the user has started pinching, it will not only callback, but the UIPinchGestureRecognizer will give you a scale by how much, which you can immediately translate into a scale.
Relevant Text:
UIGestureRecognizer Documentation
Pinch Gesture Recognizer Specifically (Notice the Scale Property)