1

当我们这样做时

self.navigationController.toolBarHidden = NO;

问题:navigationController 从何而来。我看了一下 UIViewController.h 但我根本找不到那个属性

请就此给我建议。谢谢

4

1 回答 1

1

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

@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
于 2012-06-01T13:54:41.157 回答