缩放UIScrollView与多个图像 [英] Zoom UIScrollView with multiple images

查看:52
本文介绍了缩放UIScrollView与多个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含多个UIImageViews的UIScrollFrame。

I have a UIScrollFrame that contains multiple UIImageViews.

支持这种控件缩放的正确方法是什么?

What is the correct way of supporting zoom in such a control?

'viewForZoomingInScrollView'应该返回哪个视图?

Which view should 'viewForZoomingInScrollView' return?

推荐答案

我最终通过将一个滚动视图放在一个滚动视图中来实现了它。
这样,内视图处理页面滑动,而外视图处理缩放。

I finally implemented it by putting a scrollview within a scrollview. This way, the inner view handles page swipes while the outer handles zoom.

这篇关于缩放UIScrollView与多个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆