With the retina we make images with the @2x in the name. I see where the default image has to be default-568h@2x but this does not seem to be the case for other images. Like if my background is bg.png and [email protected] I tried using [email protected] but that does not work. Can somebody tell me what the images need to be named to support the iPhone 5?
Go to Photos and open a picture. Tap on Share, scroll down and tap “Save to Files”. Tap “On My iPhone” and select a folder. To rename the image, tap the file name next to the image thumbnail and enter a name.
Go to Settings > General > About > Name.
No special suffix for iPhone 5 (4'' display), just the specific [email protected] file.
Here's a macro to handle it:
// iPhone 5 support #define ASSET_BY_SCREEN_HEIGHT(regular, longScreen) (([[UIScreen mainScreen] bounds].size.height <= 480.0) ? regular : longScreen)
Usage: (assets names - image.png, [email protected], [email protected])
myImage = [UIImage imageNamed:ASSET_BY_SCREEN_HEIGHT(@"image",@"image-568h")];
There is no specific image name. Having the Default-568h@2x will launch that image on an iPhone 5 or iPod Touch 5G and will enable the non-letterbox mode. After that, you need to design your views to be flexible. There is no special "image name" or anything for the new size.
For your background, for example, you should probably be using an image that is capable of stretching or tiling and have it configured properly before setting it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With