如何在UIScrollView中启用放大 [英] How to enable zoom in UIScrollView
本文介绍了如何在UIScrollView中启用放大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在UIScrollView中启用缩放效果?
How can enable zooming effect in UIScrollView?
推荐答案
看看此视频
视频说明:
- 添加
UIScrollViewDelegate
委托 - 获取
UIScrollView
- 获取将在Scrollview上添加的UIImageView
- 将滚动视图放在主窗口中
- 连接代表
- 设置imageView
- 设置最大/最小缩放比例[此处核心事项]
- 实现委托方法以返回视图
- Add
UIScrollViewDelegate
delegate - Take a
UIScrollView
- Take a UIImageView which is going to be added on Scrollview
- Put the scroll view in Main Window
- Connect the delegates
- Setup imageView
- Set max/min zoom scale [core thing here]
- Implement delegate method to return the view
这篇关于如何在UIScrollView中启用放大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文