Where does apple mention all the important heights of UI components?

Tab bar, navigation bar, tab bar icons, heights of UI controls ... I read User Interface Guides all day now, but they rarely mention heights. Am I looking in the wrong place? Is there any document from Apple that mentions them in one place?

+1


a source to share


3 answers


This is a variation of the question: Is it important to flexibly customize iPhone App layouts?

Apple provides the sizes of controls in the UICatalog SDK sample. see Constants.h.



Opinion is divided on whether you should design your application sizes this way. This is currently safe as there is no other device of varying sizes. I think we'll get a warning about other devices and screen size to fix any required changes.

Tony

+1


a source


I'm sure they don't tell you because they don't want you to hardcode anything. They can be resized in future versions of the OS. In fact, they filed a patent to resize the UI click targets in response to movement (so if you walk and move the device in this way, the list items can grow in height to prevent wrong clicking).



Your best bet is to query for the items in question when you add a subheading. Each of their views (navbar, tabbar, etc.) has a frame from which you can get its size and location.

+3


a source


The Constants.h file of the UICatalog example contains the following information:

// 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

      

0


a source







All Articles