views:

154

answers:

1

For our iPhone app, we are using 50 x 50 user image (from facebook). It works fine for iPhone 3G and 3GS but not for iPhone 4 due to its high resolution display. For iPhone 4 we tried to send 100 x 100 (variable height) image but it is not working for obvious reasons. Any thought?

+2  A: 

You don't need to do anything different for the Retina Display. Using exactly the same image as you have on the older iPhone will work exactly the same.

If you have a higher resolution image that you'd like to display instead, then if you save the file with a @2x suffix then, if the device has a Retina display, it will pick that instead. In most cases it should not require any extra code.

Stephen Darlington
@Stephen:For all the images on the app, we do as you have mentioned. But the user images we use are the profile images of a user from facebook (using facebook conect). And these user images are not saved on our end.
Deepa Shah
Are you saying that you want to put a 100x100 image in a space where, on a 3GS, there would be a 50x50 image? In that case I would look at the `contentScaleFactor` which is defined in `UIView` (http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/instp/UIView/contentScaleFactor).
Stephen Darlington
Thanks Stephen. We will try this solution and get back.
Deepa Shah
@stephan Thanks. This solution works perfectly well.
Deepa Shah