如何在push一个视图控制器时隐藏掉自定义的TabBar
2014-09-04 21:00
375 查看
这个问题困扰了我很久很久了,今天找到了一个解决方法,废话不多说,直接上代码!
UIImageView *tabBarView = [[UIImageView alloc] init];
NSString *imageName = @"tabBar-Final.png";
tabBarView.image = [UIImage imageNamed:imageName];
tabBarView.frame = self.tabBar.bounds;
tabBarView.userInteractionEnabled = YES;
[self.tabBar addSubview:tabBarView];
通过将自定义的tabBar直接加入系统系统自带的tabBar中,那么,在下一个要被push的界面的viewWillAppear里面设置
self.hidesBottomBarWhenPushed =YES;
即可达到效果,是不是很简单呢
UIImageView *tabBarView = [[UIImageView alloc] init];
NSString *imageName = @"tabBar-Final.png";
tabBarView.image = [UIImage imageNamed:imageName];
tabBarView.frame = self.tabBar.bounds;
tabBarView.userInteractionEnabled = YES;
[self.tabBar addSubview:tabBarView];
通过将自定义的tabBar直接加入系统系统自带的tabBar中,那么,在下一个要被push的界面的viewWillAppear里面设置
self.hidesBottomBarWhenPushed =YES;
即可达到效果,是不是很简单呢
相关文章推荐
- tabBar选项卡的背景色如何修改(自定义tabBar)&&推送nav到指定(根)视图控制器
- 自定义导航控制器,统一设置Push的时候隐藏底部的tabbar
- 自定义导航控制器,统一设置Push的时候隐藏底部的tabbar
- 隐藏自定义的tabbar之后,push到B视图,B视图的键盘工具条无法响应点击事件
- 切换控制器后,如何 隐藏/显示自定义tabBar,并添加隐藏/显示tabBar动画
- 如何新建一个空项目+添加导航视图控制器
- push到下一个页面时隐藏自定义tabbar
- UITabBar自定义tabbar如何隐藏和显示,超实用
- xcode6如何新建一个空项目+添加导航视图控制器
- 研究hidesBottomBarWhenPushed的实现原理,来实现自定义TabBar时,如何控制其显示与隐藏
- 自定义Tabbar实现push动画隐藏效果
- 使用storyboard开发,从来源控制器Push到目标控制器,隐藏Tabbar,在模拟器中,跳转后的界面的布局控件从上往下移动
- UINavi中push控制器的时候隐藏TabBar
- 如何在TabBarController push时隐藏,pop返回时显现。
- 【iOS】push控制器时隐藏tabbar,dismiss控制器时显示tabbar
- iOS使用UITabbarController跳转(push)界面,如何自动隐藏底部tabbar?
- xcode6如何新建一个空项目+添加导航视图控制器
- tabbarcontroller 内嵌导航 控制器,2层push hide tabbar 后 ,第二层直接返回根视图控制器选择tabbarcontroller的其它vc 无法显示 tabbar的 问题解决方案
- 自定义tabBar在push到下一个界面的时候实现隐藏
- iOS自定义的tabbar在push的时候隐藏