我设法得到了我的应用程序 放大我的形象,如果我双倍点击它, 但它使 t 缩放 在那里我双倍点击! 我希望图像能集中 我双倍点击的坐标!
我的代码:
.h 文件 :
- (void)handleDoubleTap:(UIGestureRecognizer *)gestureRecognizer;
.m 文件 :
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];
}
接下来我该怎么办?
提前感谢!
/一个noob