Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone4 UI Element Size in Pixels?

Does anyone know where the various screen dimensions are for the iPhone4? I have checked the MobileHIG but alls I could find where references back to the old iPhone3G. Should I just assume that all previous values are doubled (i.e. StatusBar = 40 pixels), or is there a more accurate illustration (like the one below hidden somewhere else?

alt text

Cheers Gary

like image 323
fuzzygoat Avatar asked Sep 17 '10 15:09

fuzzygoat


2 Answers

Points are the new pixels.

You keep working with the values you're used to, just like if you were still developing for 3G / 3Gs. The unit of these values is now called points instead of pixels, to avoid confusion. On the older iPhone models, a 2x2 point square equals 2x2 pixels on the screen. But on iPhone 4 the same square equals 4x4 pixels. UI elements are rendered at the appropriate resolution automatically, images and other content you provide will be scaled, unless you provide high resolution versions of those ressources.

You might want to read this document for further information.

like image 51
Toastor Avatar answered Nov 13 '22 00:11

Toastor


You shouldn't really assume anything about the screen dimensions. If you need the dimensions, read them vie the API.

There is no promise that dimensions or even proportions will stay the same forever. (The iPhone, iPad and new iPhone all have different resolution size and proportions.)

That said, the dimensions on the iPhone 4 should be exactly twice the dimensions of earlies iPhone models.

like image 1
geon Avatar answered Nov 12 '22 23:11

geon