0

Im having difficulty in understanding how to implement the tap gesture recogniser.

I want to double tap on a view and it zoom in, double tap again and zoom out.

Ive researched on here How to tap to zoom and double tap to zoom out in iOS?, looked online and checked the Apple documentation but still not getting this a im just not getting any zooming. I have checked the "user enable" check box

Ive added a gesture recogniser in IB, now I am unsure how to implemented the code/methods for this. I dont have any code to post regarding this as I've added the gesture in IB.

Advice as always appreciated.

Community
  • 1
  • 1
JSA986
  • 5,870
  • 9
  • 45
  • 91
  • Take a look here http://stackoverflow.com/questions/9008975/how-to-tap-to-zoom-and-double-tap-to-zoom-out/9009554#9009554 – GWed Dec 04 '12 at 09:00

1 Answers1

0

After you add the gesture recognizer in IB, just ctrl-drag it over to your code in the assistant and create and IBAction for it. Or connect it to a method that you already have setup.

Then that method will be called when the gesture is recognized by the view.

I'm not sure what you are trying to zoom. But, if you have that logic, then just connected it to workflow that is kicked off by the gesture recognizer events.

best of luck.

CocoaEv
  • 2,984
  • 20
  • 21
  • Im Trying to zoom in on an image, its the logic im having problems with, ive downloaded Apples sample code an still couldn't get it to work. What should I be putting for my IBaction – JSA986 Sep 02 '12 at 11:22