問(wèn)題描述
有人知道如何同時(shí)支持屏幕分辨率 iPhone4 和 iPhone 5 嗎?
在 iOS6 中,我們支持自動(dòng)布局.可以用于 iPhone4-iPhone5 屏幕,即 320x480 和 320x568.
如果我們?yōu)榇耸褂米詣?dòng)布局功能,我們將不得不將部署目標(biāo)保持在 iOS6 的最低限度.iOS5 比呢?
iOS5 比呢?我們是否必須針對(duì)不同的屏幕尺寸以編程方式處理它??/p>
我在網(wǎng)上搜索并找不到確切的答案,所以盡管懷疑是否有否決票,但還是發(fā)布了這個(gè)問(wèn)題.請(qǐng)容忍我.我想這個(gè)問(wèn)題對(duì)于在應(yīng)用程序中支持新設(shè)備是非常基礎(chǔ)的,并且適用于所有開(kāi)發(fā)人員.
如果你想支持 iOS 4.3 或 5 然后關(guān)閉 Autolayout.然后你必須設(shè)置 UIViewAutoresizing
在代碼或界面生成器中正確.
使用 autoresizingMask
on UIView
你可以讓視圖保持在一邊并隨著超級(jí)視圖的大小而增長(zhǎng).
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.
這篇關(guān)于支持 iPhone4 和 iPhone5 屏幕分辨率的最佳方式是什么?- 僅 iOS6 中的自動(dòng)布局的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!