I have image files of dimension 1900×1200. In my code I try to load it as
UIImage *image = [UIImage imageNamed:imageName];
When I try to run this code in iPhone Simulator (Retina Display) my images look out of proportion. I tried to print
image.size.width and image.size.height
and the value I get is 950×600.
What I am doing wrong. Please help me out.
The answer is actually simple: the UIImageView (and the underlying UIImage) are using scale factor 2.0. That is your 1900×1200 pixels image correspond to 950×600 points image with scale factor 2 on retina display. You can double check the UIImage’s scale property.