navigation
2018-01-08 本文已影响11人
zmjchuan
个人中心页面 没有navigationBar,push到下一页面时,navigationBar出现,返回时候,navigationBar隐藏;
- 设置代理
@interfae PersonaInfoVC () <UINavigationControllerDelegate>
self.navigationController.delegate = self;
- 实现代理方法
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
BOOL isMyInfoVC = [viewController isKindOfClass:[**PersonaInfoVC**class]];
[self.navigationController setNavigationBarHidden:isMyInfoVC animated:YES];
}

