Resize your iPhone 5 / screen mailbox

Because I think many people will ask this question (because I was) ...

Now that the latest version of Xcode allows us to test our programs on the iPhone 5 simulator, you may have noticed that your application was a “mailbox” showing black borders at the top / bottom (or left / right, depending on the orientation). There is a very simple solution for this (although this is not the right solution) that will automatically process your application as if it were created for a new iPhone.

1) Create a new application project. 2) Find the file "Default-568h@2x.png" in the project folder. 3) Add this file to your project

What is it. Interestingly, if you remove the splash of the image, it will work correctly (which tells us that this is not the right decision, but it makes the right decision in the project). Of course, you can customize this image the way you want, but basically this is how you tell the iPhone 5 to display the "full screen mode" application.

Then, to fix the presentation size formatting for both types of devices, make sure that you use

[[UIScreen mainScreen]bounds];

instead of explicitly specifying the screen size. IE, if your view was CGRectMake(0,0,310,420);

he should be

CGRectMake(0,0,bounds.size.width-10,bounds.size.height-60);

And just in case, if you do not know, the new iPhone screen size is 640x1136 (cut in half for non-retina).

The more you know ...

ps someone higher level add iphone5 tag to this

+49
iphone screen ios6 fullscreen iphone-5
Sep 13
source share

No one has answered this question yet.

See similar questions:

5
iPhone 5 [[UIScreen mainScreen])]. size.height
0
Cocos2d-x 2.2.6 iPhone 5s Resolution Error?

or similar:

1770
Get screen sizes in pixels
487
How to develop or port applications for iPhone 5 screen resolution?
9
Cancel automatic resizing of iPhone 5 screen after adding Default-568h@2x.png
5
Is there a way to just use images in applications that support iPhone 5?
3
iPod4 (iOS6) shows incorrect iPhone5 launch image
one
Will Apple allow updates to apps that are not designed for iPhone5?
one
Wrong splash screen for iPhone 6 and 6+ in Adobe AIR iOS app
0
Single screen missing in iPhone 5 app
-one
ios 6.0 and screen resolution for iphone 5 in the simulator
-2
How can I re-enable mailbox mode using iPhone 5 and Xcode 4.5.2 without uninstalling the application?



All Articles