views:

180

answers:

3

Tab bar, navigation bar, tab bar icons, heights of UI controls... I've been reading the Human Interface Guidelines now the whole day, but they rarely mention heights. Do I look in the wrong place? Is there any document from Apple that mentions them in one place?

+3  A: 

I'm pretty sure they don't tell you because they don't want you to hard-code anything. They might change sizes in future versions of the OS. In fact, they've filed a patent on changing the size of UI click targets in response to motion (so, if you're walking, and therefore jiggling the device, list elements might increase in height to prevent a mis-click).

Your best bet is to query the items in question as you're adding your subview. Each of their views (navbar, tab bar, etc) has a frame, from which you can get its size and location.

BigSprocket
+1  A: 

This is a variation of the question see: - http://stackoverflow.com/questions/852881/is-it-important-to-design-iphone-app-layouts-flexible/853032#853032

Apple provide the sizes of controls in the UICatalog SDK example. see Constants.h.

Opinion is divided as to whether you should generate your app sizes this way. Currently it is safe as there is no other device of a different size. I think we will get warning of other devices and size of screen to fix any required changes.

Tony

Tony Lambert
A: 

The Constants.h file of the UICatalog example has the following info:

// these are the various screen placement constants used across all the UIViewControllers

// padding for margins
#define kLeftMargin    20.0
#define kTopMargin     20.0
#define kRightMargin      20.0
#define kBottomMargin     20.0
#define kTweenMargin      10.0

// control dimensions
#define kStdButtonWidth   106.0
#define kStdButtonHeight     40.0
#define kSegmentedControlHeight 40.0
#define kPageControlHeight   20.0
#define kPageControlWidth    160.0
#define kSliderHeight     7.0
#define kSwitchButtonWidth   94.0
#define kSwitchButtonHeight  27.0
#define kTextFieldHeight     30.0
#define kSearchBarHeight     40.0
#define kLabelHeight      20.0
#define kProgressIndicatorSize  40.0
#define kToolbarHeight    40.0
#define kUIProgressBarWidth  160.0
#define kUIProgressBarHeight    24.0

// specific font metrics used in our text fields and text views
#define kFontName      @"Arial"
#define kTextFieldFontSize   18.0
#define kTextViewFontSize    18.0

// UITableView row heights
#define kUIRowHeight      50.0
#define kUIRowLabelHeight    22.0

// table view cell content offsets
#define kCellLeftOffset   8.0
#define kCellTopOffset    12.0
Thanks