- (void)pushViewControllerAndHiddenTabbar:(id)viewController
{
Class clazz =NULL;
if([viewControllerclass] == viewController) {
clazz = viewController;
}elseif([viewControllerisKindOfClass:[NSStringclass]]){
clazz =NSClassFromString(viewController);
}
UIViewController*vc =nil;
if(clazz) {
vc = [[clazzalloc]init];
}else{
vc = viewController;
}
//push时影响下级页面tabbar的显示
self.hidesBottomBarWhenPushed=YES;
[self.navigationControllerpushViewController:vcanimated:YES];
//pop时影响自己的页面的tabbar显示;
if(self.navigationController.viewControllers.count==2) {
self.hidesBottomBarWhenPushed=NO;
}
}
//
直接调用该方法
网友评论