tags:

views:

45

answers:

2

Do I simply check for screen size and use twice the resolution for the iPhone 4, or do I need to tell the UIButton/UITableViewCell to render the image in high resolution?

Thank you

+1  A: 

If you include a high-resolution version of the image with the same name, but with @2x before the extension, iOS will automatically choose the correct resolution according to display resolution, as long as you use the [UIImage imageNamed:] function, or set the image in IB.

http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html%23//apple_ref/doc/uid/TP40006556-CH14-SW1

Emil
+3  A: 

If you're setting the image in Interface Builder or loading it using +[UIImage imageNamed:], simply add a double resolution image to your project with a "@2x" suffix. (For example myimage.png would be [email protected].) The OS will take care of the rest for you.

See Updating Your Image Resource Files for more details.

Robot K