Search code examples
iosobjective-ciphone-5screen-size

From iPhone 4 to iPhone 5 screen size compatibility issue


I am working on the existing application. My task is to optimize screen to make compatible to screen for iphone 5. The original image as it could be seen in the first image (width and height 320*460). I have scale image to 320*548 and then used freeform in the inspector section, however, still bottom part of the screen is shown black. Any idea?

This initial image (320*460) screen shot got from iPhone 5 enter image description here

This image (320*548) screen shot got from iPhone 5 !!enter image description here2


Solution

  • In order to optimize your application for iphone-5 also you need to include a Launch Image of dimension 640*1136 and name the image as

    Default-568@2x.png

    . UIApplication automatically detect the Device screen size if it found the Default-568@2x.png it launches the App accordingly . After adding the image , clean your Derived Data and also clean the project using cmd+shift+k . After that relaunch the App .

    Hope it will help you.