首页 > 代码库 > iOS 优雅地隐藏导航栏NavigationBar (Objc)

iOS 优雅地隐藏导航栏NavigationBar (Objc)

 

 

 

@interface FSViewController () <UINavigationControllerDelegate>@end@implementation FSViewController#pragma mark - lifeCycle- (void)viewDidLoad {    [super viewDidLoad];        // 设置导航控制器的代理为self    self.navigationController.delegate = self;}// 将要显示控制器#pragma mark - UINavigationControllerDelegate- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {    // 判断要显示的控制器是否是自己    BOOL isSelf = [viewController isKindOfClass:[self class]];    [self.navigationController setNavigationBarHidden:isSelf animated:YES];}

 

 

参考资料:http://blog.csdn.net/ws1352864983/article/details/51932388

 

 


 转载请注明出处:http://www.cnblogs.com/ficow/p/7141984.html

iOS 优雅地隐藏导航栏NavigationBar (Objc)