views:

180

answers:

2

According to Apple's website, the iPhone 4 is 960-by-640-pixel resolution at 326 ppi. I made an image with these specs, however when I put it onto my iPhone as a background for one of my applications, it is way too big and you can only see the upper left corner of the image. How do I make it fit and how do I make a high resolution iPhone 4 background?

+5  A: 

You need to give it the name "[email protected]" with the important part being @2x so they can apply the scale correctly.

Realize though that you also need "someImage.png" which is half that size for devices without the retina display.

I always use the "someImage.png" file as the initial image and then the OS will automagically switch to the @2x image during runtime so don't worry about that. Just set it to the standard 320x480 or 480x320 and let the OS do the rest.

iWasRobbed
e.g. [email protected] and Default.png
Matt Williamson
Would you prefer to use PNG? Is it better than JPG for this?
Robert Eisinger
PNG = higher quality = better user experience = a happy Apple. Plus it has a transparent alpha channel. I don't like using JPEGs since the compression makes them look terrible. On top of that, the compiler will optimize all PNGs prior to bundling them so they will shrink a little in size.
iWasRobbed
+1  A: 

Are you using an UIImageView? You should have two versions of your images

  • image.png - normal 320x480 image for older phones
  • [email protected] - for iphone4 with the 640x960 resolution

When you set the file location (be it programically or in Interface Builder) just tell it about the 'image.png'. The iPhone4 will automatically look for the '@2x' version.

ACBurk
Is PNG preferred?
Robert Eisinger
nope, just used it as an example
ACBurk