ArticleDirectory
- Points vs. pixels
- Adjusting sizes
- Additional references
Element |
Size (in points) |
Window (including status bar) |
320x480 PTS |
Status Bar (How to hide the status bar) |
20 PTS |
View inside Window (Visible status bar) |
320x460 |
Navigation Bar |
44 PTS |
Nav bar image/ Toolbar Image |
Up to 20x20 PTS (transparent PNG) |
Tab bar |
49 PTS |
Tab bar icon |
Up to 30x30 PTS (transparent pngs) |
Text Field |
31 PTS |
Height of a view inside A navigation bar |
416 PTS |
Height of a view inside A tab bar |
411 PTS |
Height of a view inside A navbarAndA tab bar |
367 PTS |
Portrait keyboard height |
216 PTS |
Landscape keyboard height |
140 PTS |
Points vs. pixels
The iPhone 4 introduced a high resolution display with twice the pixels of previous iPhones. however you don't have to modify your code to support high-res displays; the coordinate system goes by points rather than pixels, and the dimensions in points of the screen and all UI elements remain the same.
IOS 4 supports High Resolution displays (like the iPhone 4 display) viaScaleProperty on uiscreen, uiview, uiimage, and calayer classes. if the object is displaying high-res content, its scale property is set to 2.0. Otherwise it defaults to 1.0.
All you need to do to support high-res displays is to provide @ 2x versions of the images in your project. see the checklist for updating to ios4 or apple documentation for supporting high resolution screens for more info.
Adjusting sizes
Click here to see how to adjust view frames and bounds.
Additional references
- Apple documentation: points vs. pixels
- Apple documentation: uibarbuttonitem class reference says "typically, the size of a toolbar and navigation bar image is 20x20 points."
- Apple documentation: uitabbaritem class reference says "the size of an tab bar image is typically 30x30 points."