I am developing an universal app where I have given a background image for a UIView
using the following code.
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"backImage.png"];
[self.view addSubview:imgView];
[self.view sendSubviewToBack:imgView];
I have created the following images and added to the project,
backImage.png
backImage@2x.png
backImage-Portrait~ipad.png
backImage-Portrait@2x~ipad.png
backImage-Landscape~ipad.png
backImage-Landscape@2x~ipad.png
But it does not seem to take the correct images.
It works fine when I run the app on iphone (I mean it takes the backImage.png and backImage@2x.png accordingly) but when I run the app on ipad it does not use the ipad images, it still uses the iphone images. Can anyone please tell what must be going wrong.
Thanks in advance.