缩放基于视图的iOS App的页面 [英] Zoom the page of a view based iOS App
问题描述
我有一个基于视图的应用程序。我必须添加诸如捏缩放和双击等功能来缩放iOS应用程序中的页面( UIView
)。它很容易缩放 UIScrollview
。
I have a view based application. I have to add features like pinch zoom and double tap to zoom the page(UIView
) in the iOS application. Its easy to zoom a UIScrollview
.
我应该创建一个框架,可以选择平移和缩放整个应用程序。如何实现缩放基于视图的应用程序?我欢迎您的想法!
I should create a framework which has the option to pan and zoom the entire app. How do a achieve to zoom a view based application? I welcome your ideas!
推荐答案
最好的方法是将整个应用程序组件放在一个scrollview中并使用缩放控件。
The best way to do it, is to put the entire app components in one scrollview and use the zooming of the control.
另一种不如第一种方式稳定的方法是根据捏缩放比例缩放UIVIEW内的所有对象,但请记住,缩放会影响整个应用程序的外观,因此您需要相应地调整每个对象的位置。
The other way which is not as stable as the first one, is to scale all objects inside the UIVIEW larger or smaller depending on the pinch zoom, but keep in mind that scaling will affect the look of the entire application, so you need to adjust the position of each object accordingly.
这篇关于缩放基于视图的iOS App的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!