Document directory
- Points vs. pixels
- Adjusting sizes
- Additional references
The size of the iPhone interface elements, which are reprinted for query.
Original article address:
Http://www.idev101.com/code/User_Interface/sizes.html
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
The screen and all UI elements remain the same.
IOS 4 supports High Resolution displays (like the iPhone 4 display) via the scale property 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 ."