有人知道如何同时支持屏幕分辨率 iPhone4 和 iPhone 5 吗?
在 iOS6 中,我们支持自动布局.可以用于 iPhone4-iPhone5 屏幕,即 320x480 和 320x568.
如果我们为此使用自动布局功能,我们将不得不将部署目标保持在 iOS6 的最低限度.iOS5 比呢?
iOS5 比呢?我们是否必须针对不同的屏幕尺寸以编程方式处理它?</p>
我在网上搜索并找不到确切的答案,所以尽管怀疑是否有否决票,但还是发布了这个问题.请容忍我.我想这个问题对于在应用程序中支持新设备是非常基础的,并且适用于所有开发人员.
如果你想支持 iOS 4.3 或 5 然后关闭 Autolayout.然后你必须设置 UIViewAutoresizing
在代码或界面生成器中正确.
使用 autoresizingMask
on UIView
你可以让视图保持在一边并随着超级视图的大小而增长.
Have anyone figured out how to support both screen resolution iPhone4 and iPhone 5 ?
In iOS6 we have support of Autolayout. Can that be used for iPhone4-iPhone5 screen i.e. 320x480 and 320x568.
If we use auto layout feature for that we will have to keep deployment target minimum to iOS6. What about iOS5 than ?
What about iOS5 than ? Do we have to handle it programatically for different screen size ?
I searched web and could not find exact answer for that so posting this question though having doubt of having downvotes. Please bear with me for that. I guess this question is very basic to support new device in applications and is applicable to all developers.
If you want to support iOS 4.3 or 5 then turn off the Autolayout.Then you have to set the UIViewAutoresizing
correctly either in code or interface builder.
With the autoresizingMask
on UIView
you can make the view stick to aside and grow with the size of the superview.
这篇关于支持 iPhone4 和 iPhone5 屏幕分辨率的最佳方式是什么?- 仅 iOS6 中的自动布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!