[英]Zooming Out in a UIScrollView
I want help with my UIScrollView: 我需要有关UIScrollView的帮助:
I have implemented my UIScrollView in my project and everything works fine but I have problems when Im trying to implement zoom, but this is not as the zoom when we are looking a picture. 我已经在项目中实现了UIScrollView,并且一切正常,但是当我尝试实现缩放时遇到了问题,但是当我们查看图片时,这并不是缩放。 I am trying to zoom out.
我正在尝试缩小。 My app begins as this graphic when it launches.
我的应用程序启动时即以此图形开始。 Lets suppose that I have a UIView in the screen which is bigger than my screen.
假设我的屏幕上有一个大于我的屏幕的UIView。
--------------------------------------------
| | | |
| | | |
| -----|----------------------|---------|
| | | | |<---------UIView
| | | |<------------------ iPhone Screen frame
| | | | |
| -----|----------------------|---------|
| | | |
| | | |<-------- ScrollView Content size
| | | |
| | | |
| | |<----------------- ScrollView Frame Size
| | | |
| | | |
| | | |
| | | |
| | | |
| ------------------------ |
| |
| |
| |
--------------------------------------------
And I want my screen look like this when I zoom out. 我希望我的屏幕在缩小时看起来像这样。
------------------------
| |
| ------------------|
UIView-------->| |
| | |
| ------------------|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
------------------------
How can I do it? 我该怎么做?
Set scrollView.minimumZoomScale = 0 then you can zoom out as much as you want. 设置scrollView.minimumZoomScale = 0,则可以根据需要进行尽可能多的缩小。 If you don't want to zoom out too much, give it a reasonable value.
如果您不想放大太多,请给它一个合理的值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.