Supporting the iPhone 5 Display Height

September 21, 2012 Rebecca Putinski

Apple recently launched the new Xcode and simulators for development. Included is the new iPhone 5 — called ‘Retina-4’ — simulator. It functions in the same was as the original — now called ‘Retina-3.5’.

You may have noticed that right away, your app appears letter-boxed even if you are using the full bounds of the screen: [[UIScreen mainScreen] bounds], or similar.

Using the Full Height

The solution involves just one step. To activate the new screen size, simply provide a Default-568h@2x.png splash image. The image should appear in your Xcode settings under the app info and Launch Images section. The 568 is the 1.0 scale for the new height. So at scale=2.0, the final height of your new launch image should be 640px x 1136px.

Simply drop that into your project and run it. You should see your app take the entire height. If not, make sure you are always using the views’ frame size/bounds instead of a hard-set value.

About the Author

Biography

More Content by Rebecca Putinski
Previous
Case Commons is looking for a DevOps Engineer
Case Commons is looking for a DevOps Engineer

At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. Pivotal Lab...

Next
Avoid using fixture_file_upload with FactoryGirl and Paperclip
Avoid using fixture_file_upload with FactoryGirl and Paperclip

Joe Moore and I are using FactoryGirl and Paperclip for file attachments. The factory for building our Att...

×

Subscribe to our Weekly Newsletter

!
Thank you!
Error - something went wrong!