For the application loading screen and the splash screen, I used two different methods for displaying iPhone 3, iPhone 4 and iPhone 5 images. Accordingly.
For the boot screen, just add -568h @ 2x to your image to support iPhone5.
For the splash screen, I used a series (if height ==) to check the height of the UIScreen borders and matched the corresponding image to the image representation. It was obvious to me that -568h is not universally recognized as an iPhone 5 image. It only applies to the boot screen.
Now, in my AppDelegate, I am setting the background image. All of my routines have a transparent background, so they should be displayed on the background image. However, I am having problems adjusting the background image.
Just going to "Background.png" Adding -568h @ 2x to the end of the file name does not work. It will not do a retina and a 3.5-inch retina display, but will not display a 4-inch display.
t
self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];
If I use the code snippet above, the iPhone4 image is used instead of the iPhone5 image, and that is not what I want.
I switched to trying to do the same thing as with a pop-up screen. I have had many cases:
CGFloat height = [UIScreen mainScreen].currentMode.size.height; if ( height == 1136 ) { //Choose image here } else if (height == 960) { //Choose image here } else if (height == 480) { //Choose image here } self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:chosenImage]];
But the colorWithPatternImage function believes that selectedImage has a value of 1 dot = 1 pixel. So I get a reticulated image trying to fit on the screen of the iPhone 5. What does this expression look like? It seems that only the top left quadrant of the image that I wanted is displayed on the entire screen of the iPhone 5. It seems that retina scaling has not been applied.
I need the iPhone to know that I have an iPhone 5 retina compatible image that will be used as the background. How to do it?