1

Well, I have basically two questions regarding screen resolution in iOS devices.

1) In iOS documentation, on the Point vs Pixels section, it states the coordinates are passed in to framework as points, and that "One point does not necessarily correspond to one pixel on the screen." as found here: https://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html

When they are different? Up until now I was assuming they were equal and passing in pixel coordinates. Is this a parameter that changes from device to device?

2) I'm also a little bit confused about PPI. I know what it means on the hardware screen (if a 10" and a 7" display have the same pixel resolution then the 7" display will have a better image quality since the PPI is higher). But what difference it makes if I save a .png with 72ppi or 96 or even 326? Is it just for printing or does it make any difference visually on my screen?

Thanks

Felipe Lira
  • 310
  • 1
  • 4
  • 17

1 Answers1

4

On retina devices (iPhone 4, 4S, or 5, and iPad 3 or 4), there are 2 pixels per point. On non-retina devices, there is 1 pixel per point.

Except for the iPhone 5, all iPhones have a screen size of 320x480 points. The retina iPhones have a screen size of 640x960 pixels (but the same point size as the non-retina devices).

When working with images in iOS, it is the pixel size that matters, not the PPI. Just remember that your @2x images should have twice the width and height of the regular, non-retina images.

John Topley
  • 113,588
  • 46
  • 195
  • 237
rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Thanks. So if I have a image with a frame of 256x256. In retina displays will it be rasterized in a 512x512 pixel display area right? Basically I have to work with 3 different interface sets (iPad, iPhone & iPhone 5)? How do I change simulator to run app on iPhone5? – Felipe Lira Mar 27 '13 at 19:22
  • If the image is 256x256 pixels and it is named foo.png then it will show up as 256x256 pixels/points on non-retina devices. If the image is 256x256 pixels and named foo@2x.png then it will show up as 128x128 points or 256x256 pixels on retina devices. In the simulator, select the Hardware|Device menu. Pick the device and size. – rmaddy Mar 27 '13 at 19:25