IOS学习笔记-UINavgationController

王朝学院·作者佚名  2016-08-27
窄屏简体版  字體: 小  |  中  |  大  |  超大  

Creating Navigation Controllers

方法:initWithRootViewController:

Initializes and returns a newly created navigation controller.

- (instancetype)initWithRootViewController:(UIViewController *)rootViewController

参数:UIViewController

方法:initWithNavigationBarClass:toolbarClass

Initializes and returns a newly created navigation controller that uses your custom bar subclasses.

- (instancetype)initWithNavigationBarClass:(Class)navigationBarClass

toolbarClass:(Class)toolbarClass

参数:navigationBarClass、toolbarClass

属性:topViewController

The view controller at the top of the navigation stack. (read-only)

@PRoperty(nonatomic, readonly, retain) UIViewController *topViewController

属性:visibleViewController

The view controller associated with the currently visible view in the navigation interface. (read-only)

@property(nonatomic, readonly, retain) UIViewController *visibleViewController

属性:viewControllers

The view controllers currently on the navigation stack.

@property(nonatomic, copy) NSArray *viewControllers

方法:setViewControllers:animated:

Replaces the view controllers currently managed by the navigation controller with the specified items.

- (void)setViewControllers:(NSArray *)viewControllers

animated:(BOOL)animated

Pushing and Popping Stack Items方法:pushViewController:animated:

Pushes a view controller onto the receiver’s stack and updates the display.

- (void)pushViewController:(UIViewController *)viewController

animated:(BOOL)animated

参数:viewController、animated

方法:popViewControllerAnimated:

Pops the top view controller from the navigation stack and updates the display.

- (UIViewController *)popViewControllerAnimated:(BOOL)animated

参数:animated

方法:popToRootViewControllerAnimated:

Pops all the view controllers on the stack except the root view controller and updates the display.

- (NSArray *)popToRootViewControllerAnimated:(BOOL)animated

参数:animated

方法:popToViewController:animated:

Pops view controllers until the specified view controller is at the top of the navigation stack.

- (NSArray *)popToViewController:(UIViewController *)viewController

animated:(BOOL)animated

参数:viewController、animated

属性:interactivePopGestureRecognizer

The gesture recognizer responsible for popping the top view controller off the navigation stack. (read-only)

@property(nonatomic, readonly) UIGestureRecognizer *interactivePopGestureRecognizer

Configuring Navigation Bars属性:navigationBar

The navigation bar managed by the navigation controller. (read-only)

@property(nonatomic, readonly) UINavigationBar *navigationBar

方法:-setNavigationBarHidden:animated:

Sets whether the navigation bar is hidden.

- (void)setNavigationBarHidden:(BOOL)hidden

animated:(BOOL)animated

Hiding the Navigation Bar

属性:hidesBarsOnTop

属性: hidesBarsOnSwipe

属性:hidesBarsWhenVerticallyCompact

属性:hidesBarsWhenKeboardAppears

属性:navigationBarHidden

属性:barHideOnTapGestureRecognzier

属性:barHideOnSwipeGestureRecognizer

附言:

Use this initialization method if you want to usecustom navigation bar or toolbar subclasses with the navigation controller. If you use this method, you are responsible foradding a root view controller before presenting the navigation controller onscreen.

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航