[Solved] iPhone 5 UI issue [closed]


First, you must define a new splash screen for the 4-inch screen. The image should be named “[email protected]“, and when you add it to your project, your app will appears occupying the entire screen.

There is no suffix to set images for the new screen. You will have to create new images, name them as you like and check the size of the screen to find out which should display.

I suggest you create a macro, like this:

#define IPHONE5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON )

In its implementation, check to display the correct image:

NSString *imgName;
if (IPHONE5) {
    imgName = @"image.png";
} else {
    imgName = @"image-4inch.png";
}
[self.image setImage:[UIImage imageNamed:imgName]];

1

solved iPhone 5 UI issue [closed]