Handling the larger device size of iPhone 5 [duplicate]

牧云@^-^@ 提交于 2019-12-06 14:02:40

问题


Possible Duplicate:
How to deal with iPhone 5 screen size?

Watched the iPhone 5 keynote and yes the device height and a resolution of 640 X 1136. So I saw they showed how existing apps which work on that. But I believe if we use native components like tab bar, navigation bar etc. will work fine. But how about custom tab bars, navigation bars and controls which resides relative to the device orientation. So these are my questions.

1) How to handle custom layouts which has custom tab bars, navigation bars, relative contents etc.

2) Welcome screen. We will need 2 sizes right now. So in iPhone 5 do we need another 2 more for normal and retina?

3) If you carefully watched the keynote seems iPhone 5 will cut some portion of view from left and right so there is no any additional change in the app development. Has anybody noticed that?


回答1:


1) This depends on how you laid them out, you might need to adjust how you set the frame, change autoresizing masks etc, or if iOS 6 only is an option you could move to auto layout. Without knowing your code I cant give much more detail

2) There is no non-retina iPhone 5 so you only need 1 more Default.png size, named Default-568h@2x.png (btw adding this new sized default image is the trigger for iOS to show your app without letterboxing, so for some apps this is the only change which will need to be made)

3) This is the letterboxing I mentioned, it is what all current apps will do on the iPhone 5 until they are updated with a new default.png




回答2:


My understanding is that all existing apps will work on iPhone 5 and you will just have the black borders. However you will now have the capability to tailor apps to the bigger screen size. I imagine that there will now be a new sized .xib or storyboard that will match the size of the iPhone 5. You will be able to put an if statement in the app delegate to choose which .xib/storyboard to load based on the screen size. unfortunately now I think we will have to create multiple .xib/storyboard files, similar to how universal apps are made at the moment. The file loaded is selected based on the device.

Hope this helps



来源:https://stackoverflow.com/questions/12420521/handling-the-larger-device-size-of-iphone-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!