Conversion of existing applications to be compatible with iphone5? [duplicate]

好久不见. 提交于 2019-12-22 09:16:53

问题


Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?

I have some applications in IPhone.Now i want them to be compatible to IPhone5.Somewhere i read that i need to change the splash screen to 4 inch.Shall i need to change this in all my xibs,or splash only.Currently i am using xcode4.2.i am getting IPhone5 simulator,is that enough or i need to install any later version to get the correct simulator.Where from i will get the latest simulator of IPhone5. Can anybody help me with the exact steps for acheving this transition?


回答1:


You definitely need to install XCode 4.5, and to create a new splash image for the 4-inch screen, called Default-568h@2x.png.

You shouldn't change the size of your xibs, because you'll want your app to work on both old and new phones. However, you may want to change the autoresizing masks of some of the views in your xibs so that they stretch to fill the larger screen.




回答2:


here are the points *if you want to make use of full height of the iPhone5 create splash screen that's exactly 640x1136 pixels in size and name default-568h@2x.png *if you have problem with rotation check a)window.rootViewController = firstViewcontroller (dont add view to your window) b)implement the new rorate delegate function

*Use viewDidLayoutSubviews rather than viewDidLoad to set up widget sizes relative to the window *You can manually check the screen size and load the right image like this:

    UIImage* myImage;
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
if ([UIScreen mainScreen].scale == 2.f && screenHeight == 568.0f) {
   myImage = [UIImage imageNamed:@"myImage-568h@2x.png"];
} else {
} 

myImage = [UIImage imageNamed:@"myImage.png"];

or use catogary from the following GIT gist https://gist.github.com/3719620




回答3:


if you want to test your app with IOS 6 simulator with 4 inch display you need to install Xcode 4.5 from developer center.

UPDATED: You can refer to discussion Will Xcode 4.3.2 suffice to build apps for iOS 6?



来源:https://stackoverflow.com/questions/12560147/conversion-of-existing-applications-to-be-compatible-with-iphone5

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