处理捏合缩放手势
我正在使用苹果示例代码_TapToZoom。他们使用 UIGestureRecognizers 处理单次、双击,以在用户点击时缩放滚动视图(带图像)。现在我想当用户在图像滚动视图上捏缩放时实现相同的功能。我正在浏览这么多链接,但没有帮助。请帮我解决这个问题......
I am working with the apple sample code _TapToZoom. They handled single, double taps using UIGestureRecognizers to scale the scrollview(with image) when user taps. Now I would like to implement the same functionality when user pinch zooming on the image scrollview. I am going through the so many links, but not helpful. Please help me to resolve this....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加手势识别器,如下所示:
此条件将检查手势识别器是否为 UIPinhcgestureRecognizer,内部条件检查用户是否捏合或缩放:
Add the gesture recognizer like so:
This condition will check if the gesture recognizer is a UIPinhcgestureRecognizer and the inner conditions check if the user has pinched or zoomed: