Developing fullscreen 4inch app in xcode

k06a picture k06a · Sep 13, 2012 · Viewed 7.4k times · Source

Possible Duplicate:
How do I support the taller iPhone 5 screen size?

How to make my app 4inch-ready? My app in iOS6GM simulator looks not 4inch-sized. Is there any option in xcode to use all 4 inches?

enter image description here

Answer

Sverrisson picture Sverrisson · Sep 13, 2012

Some users have reported that it was fixed after adding the startup image [email protected] (see below). For updating to iPhone5 I did the following:

Autorotation is changing in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation: method of UIViewController is deprecated. In its place, you should use the supportedInterfaceOrientationsForWindow: and shouldAutorotate methods. Thus, I added these new methods (and kept the old for iOS 5 compatibility):

-(BOOL)shouldAutorotate {
  return YES;
}

- (NSUInteger)supportedInterfaceOrientations{
  return UIInterfaceOrientationMaskAllButUpsideDown;    
}
  • Then I fixed the autolayout for views that needed it.
  • Copied images from the simulator for startup view and views for the iTunes store into PhotoShop and exported them as png files.
  • The name of the default image is: [email protected] the size is 640 x 1136 and the screen size 320 x 568.
  • I have dropped backward compatibility for iOS 4. The reason is that this new Xcode does not support armv6 code any more. Thus, all devices that I am able to support now (running armv7) can be upgraded to iOS 5.

That was all but just remember to test the autorotation in iOS 5 and iOS 6 because of the changes in rotation.