My application, which should support iOS 5.0+ I have background UIImage, which should be load proper image depending on device. So I've created 5 images with corresponding resolutions.
- img.png
- [email protected]
- [email protected]
- img~ipad.png
- img@2x~ipad.png
Also I've set [email protected] splash image. I then detect in viewDidLoad which device my app is running and use
[bkgImageView setImage:[UIImage imageNamed:@"img.png"]];
to load appropriate image. All resolutions are loading just fine except iPhone 4" one, which is [email protected]. If I load this one explicitly
[bkgImageView setImage:[UIImage imageNamed:@"[email protected]"]];
the scale is not correct. So how can I load 4" retina image automagically or manually?