Ive managed to get my app to zoom in my image if I double tap it, but it dosen't zoom in where I double tapped! I want the image to centre the coordinate that I double tapped!
My code:
in the .h file:
- (void)handleDoubleTap:(UIGestureRecognizer *)gestureRecognizer;
in the .m file:
UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleTap:)];
[doubleTap setNumberOfTapsRequired:2];
[self.scroll addGestureRecognizer:doubleTap];
- (void)handleDoubleTap:(UIGestureRecognizer *)gestureRecognizer {
if(self.scroll.zoomScale > scroll.minimumZoomScale)
[self.scroll setZoomScale:scroll.minimumZoomScale animated:YES];
else
[self.scroll setZoomScale:1.6 animated:YES];
}
What should I do next?
Thanks in advance!
/A noob