一个视图的navigationController

时间:2012-06-01 13:46:18

标签: iphone uinavigationcontroller

当我们这样做时

self.navigationController.toolBarHidden = NO;

问题:navigationController来自哪里。我看一下UIViewController.h,但我找不到那个属性

请就此向我提出建议。感谢

1 个答案:

答案 0 :(得分:1)

查看UINavigationControllerItem上的UIViewController类别(在 UINavigationControler.h 中):

@interface UIViewController (UINavigationControllerItem)

@property(nonatomic,readonly,retain) UINavigationItem *navigationItem; // Created on-demand so that a view controller may customize its navigation appearance.
@property(nonatomic) BOOL hidesBottomBarWhenPushed; // If YES, then when this view controller is pushed into a controller hierarchy with a bottom bar (like a tab bar), the bottom bar will slide out. Default is NO.
@property(nonatomic,readonly,retain) UINavigationController *navigationController; // If this view controller has been pushed onto a navigation controller, return it.

@end