UIScrollView放大固定点,并禁用放大/缩小功能



我遇到UIScrollView 的问题

我想在用户点击特定点时缩放滚动视图,并防止用户使用"缩放手势"放大/缩小,我该怎么做?

[imgScroll setDelegate:self];
float minimumScale = [imgScroll frame].size.height  / [imageView frame].size.height;
[imgScroll setMinimumZoomScale:minimumScale];
[imgScroll setZoomScale:minimumScale];
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
return [imageView viewWithTag:ZOOM_VIEW_TAG];}

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale {
[scrollView setZoomScale:scale+0.01 animated:NO];
[scrollView setZoomScale:scale animated:NO];}

thx。

我在`UIScrollView中禁用了缩放适当性,在界面生成器中检查了触摸部分下的所有适当性。

最新更新