The UIStatusBarStyle constant, controls the status bar style.
To specify the status bar style, you set a value in your Info.plist file. (For more information about the
contents of this file, see “UIKit Keys”; to learn how to set values, see Property List Editor Help .)
一般不建议自定义状态栏,主要考虑到兼容性
On iPhone, specify the color of the status bar. You can choose gray (the default color), opaque black, or
translucent black (that is, black with an alpha value of 0.5).
Be sure to choose a status bar appearance that coordinates with the rest of your iPhone app. For example,
avoid using a translucent status bar if the navigation bar is opaque. 避免使用同名的状态栏如果导航栏不是透明的。
On iPhone, set whether the change in status bar color should be animated. Note that the animation causes
the old status bar to slide up until it disappears off the screen while the new status bar slides into place.
A navigation bar enables navigation through an information hierarchy and, optionally, management of screen
contents.A navigation bar is contained in a navigation controller, which is an object that manages the display of your
hierarchy of custom views
On iPhone, changing the device orientation from portrait to landscape can change the height of the navigation
bar automatically. On iPad, the height and translucency of a navigation bar doesn’t change with rotation.
On iPhone, a navigation bar always displays across the full width of the screen. On iPad, a navigation bar can
display within a view—such as one pane of a split view—that doesn’t extend across the screen.
在iphone中如果改变设备的方向会自动改变状态条的高度。而在ipad中状态条的高度和透明度时不会随着旋转而改变的。iphone中状态条的宽度总是全屏的宽度,
在ipad中,状态条却是可以显示在一个视图中的。
On iPhone, be prepared for the change in navigation bar height that occurs on device rotation. In particular,
make sure that your custom navigation bar icons fit well in the thinner bar that appears in landscape orientation.
Don’t specify the height of a navigation bar programmatically; instead, you can take advantage of the
UIBarMetrics constants to ensure that your content fits well.
在iphone中注意横屏时导航栏的高度变化,不要在程序中指定导航栏的高度,而是可以利用UIBarMetrics来使得内容适配。
A toolbar contains controls that perform actions related to objects in the screen or view.
A toolbar is typically contained in a navigation controller, which is an object that manages the display of a
hierarchy of custom views. toolbar一般都会嵌入到navigation controller中
On iPhone, a toolbar always appears at the bottom edge of a screen or view, but on iPad it can instead appear
at the top edge. 在iphone中经常出现在屏幕或者视图的下方,但是在ipad中却是可以显示在上方的。
On iPhone, changing the device orientation from portrait to landscape can change the height of the toolbar
automatically. On iPad, the height and translucency of a toolbar don’t change with rotation.
iphone中屏幕旋转会改变工具条的高度,但是在ipad中却不会改变
On iPhone, a tab bar can display no more than five tabs at one time; if the app has more tabs, the tab bar
displays four of them and adds the More tab, which reveals the additional tabs in a list. On iPad, a tab bar can
display more than five tabs.
在iphone中tab bar只能一次显示5个tabs,如果有多余的会显示more tab,而ipad中却是可以显示超过5个tab的
2, Content Views
For iPhone and iPod touch: About 43 x 43 pixels About 86 x 86 pixels (high resolution)
For iPad:About 55 x 55 pixels About 110 x 110 pixels (high resolution)
A split view is a full-screen view that consists of two side-by-side panes.
A table view presents data in a single-column list of multiple rows.
An action sheet has two different appearances. On iPhone, an action sheet always emerges from the bottom
of the screen and hovers over the app’s views (an action sheet for Safari on iPhone is shown above). The side
edges of an action sheet are anchored to the sides of the screen, which reinforces its connection to the app
and to the user’s most recent action.
On iPad, an action sheet is always displayed within a popover; it never has full-screen width (to learn more
about popovers, see “Popover (iPad Only)” (page 144)). An action sheet can cause a popover to appear, or it
can appear within a popover that’s already open. In both cases, there’s a strong visual connection between
the action sheet and the user’s action. For example, the action sheet shown here is displayed when the user
taps the Mail Reply button on iPad.
On iPhone, coordinate the action sheet background appearance with the navigation bars and toolbars.
On iPhone, include a Cancel button so that users can easily and safely abandon the task
On iPad, choose whether to display an action sheet with animation or without animation.
Avoid making users scroll through an action sheet.
On both devices, use the red button color if a potentially destructive action can be performed.
Activity Indicator UIActivityIndicatorView
An activity indicator shows that a task or process is progressing (shown here with a label).
Date Picker UIDatePicker
A date picker displays components of date and time, such as hours, minutes, days, and years.