Sunday, 05 September 2010

Touch4Apps Blog | posts about iPhone : iPad : iPod app development

When setting up an image to the UIImageView for dbl resolution for retina display make sure to set the image after setting the frame of the view as initWithImage on UIImageView does not work properly.

 

1
2
UIImageView *backgroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
[backgroundImageView setImage:[UIImage imageNamed:@"bg-wall01.jpg"]];

 

Where in resources we have file named " This e-mail address is being protected from spambots. You need JavaScript enabled to view it ", iOS4 does the trick for us to set the image scale to 2.0 for us (or rather 0.5 in fact).

Happy coding!

 

Leave a CommentTrackback

Add comment


Security code
Refresh