iPhone and iPad screen resolution

ipad, iphone

Solution

Retina iPhones and iPads use the same coordinate system as non-Retina devices. Presently all iPads have a logical coordinate space of 768x1024, and all iPhones except the iPhone 5 have a logical coordinate space of 320x480. Your code should work fine on both Retina and non-Retina devices.

On an iPhone 5, your app will be shown with black bars at the top of the screen unless you tell iOS that you want to use the full screen by including a Default.png for the extended screen resolution.

You can check the screen resolution with `[[UIScreen mainScreen] bounds]`. This value will be the same on Retina and non-Retina devices. You can detect a Retina device by checking the value of `[[UIScreen mainScreen] scale]`; the value here is the number of physical pixels per unit of logical coordinate space (1.0 for non-Retina, 2.0 for Retina).

Problem

I m developing a universal app.I want to know will the screen resolutions (320 * 480) for iphone and (768 *1024 )in iPad will work for all iphone's (iPhone 3g,iPhone4 etc) and all iPads.Because based on these screen resolutions I m setting textField's, UILabel's width in both iPhone and iPad.Will these work for retinas and nonretinas ?

Original source