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
- img@2x.png
- img-568h@2x.png
- img~ipad.png
- img@2x~ipad.png
Also I've set Default-568h@2x.png 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 img-568h@2x.png. If I load this one explicitly
[bkgImageView setImage:[UIImage imageNamed:@"img-568h@2x.png"]];
the scale is not correct. So how can I load 4" retina image automagically or manually?