美文网首页
页面跳转并隐藏Tabbar

页面跳转并隐藏Tabbar

作者: 小柴2011 | 来源:发表于2017-05-16 11:25 被阅读6次

- (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;

}

}

//

直接调用该方法

相关文章

网友评论

      本文标题:页面跳转并隐藏Tabbar

      本文链接:https://www.haomeiwen.com/subject/aiqlxxtx.html