달력

10

« 2024/10 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

http://www.iphonedevsdk.com/forum/iphone-sdk-development/52507-user-resize-image-screen.html
Unread 07-07-2010, 10:18 PM   #2 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 22
Default

Quote:
Originally Posted by mitchsamuels View Post
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
:
Posted by netkorea