现在的位置: 首页 > 综合 > 正文

关于NavigationBar的返回按钮

2019年10月01日 ⁄ 综合 ⁄ 共 737字 ⁄ 字号 评论关闭

The navigation controller checks the following things when a new view controller is pushed:


1. If the new top-level view controller has a custom left bar button item, that item is displayed. To specify a custom left bar button item, set the leftBarButtonItem property of the view controller’s navigation item.


2. If the top-level view controller does not have a custom left bar button item, but the navigation item of the previous view controller has a valid item in its backBarButtonItem property, the navigation bar displays that item.


3. If a custom bar button item is not specified by either of the view controllers, a default back button is used and its title is set to the value of the title property of the previous view controller—that is, the view controller one level down on the stack.
(If there is only one view controller on the navigation stack, no back button is displayed.)

抱歉!评论已关闭.