You just need to pass the main name of the image. Say our image name is "Apple.png", then you write the name of the image recipient like this UIImage *image = [UIImage ImageNamed:@"Apple.png"] , and the name for the image for the following cases will be:
1. iPad > put ~ ipad, the image name will be "Apple~ipad.png"
2. iPhone > install ~ iphone, the image name will be "Apple~iphone.png"
3.for retina display> put @ 2x, the image name will be " Apple@2x.png "
4. If you have a diffrenet image for the retina for ipad and iphone, it will look like iPad " Apple@2x ~ipad.png" , for iPhone " Apple@2x ~iphone.png"
If you name it like this, iOS will detect the best image image name and load it.
Malek_Jundi
source share