What is the best way for supporting both screen resolution of iPhone4 and iPhone5 ? - Auto layout in only iOS6(支持 iPhone4 和 iPhone5 屏幕分辨率的最佳方式是什么?- 仅 iOS6 中的自动布局)
问题描述
有人知道如何同时支持屏幕分辨率 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 中的自动布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:支持 iPhone4 和 iPhone5 屏幕分辨率的最佳方式是什


- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01