UITabBarController 隐藏标签栏
来源:互联网 发布:网络文明调查问卷 编辑:程序博客网 时间:2024/06/05 16:06
I am pasting this from my working code... you can call these methods to hide and show the tabbarcontroller.... just pass tabbarcontroller instance to these functions..
[self hideTabBar:self.tabBarController];
- (void) hideTabBar:(UITabBarController *) tabbarcontroller { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; for(UIView *view in tabbarcontroller.view.subviews) { if([view isKindOfClass:[UITabBar class]]) { [view setFrame:CGRectMake(view.frame.origin.x, 480, view.frame.size.width, view.frame.size.height)]; } else { [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 480)]; } } [UIView commitAnimations];}- (void) showTabBar:(UITabBarController *) tabbarcontroller { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; for(UIView *view in tabbarcontroller.view.subviews) { NSLog(@"%@", view); if([view isKindOfClass:[UITabBar class]]) { [view setFrame:CGRectMake(view.frame.origin.x, 431, view.frame.size.width, view.frame.size.height)]; } else { [view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 431)]; } } [UIView commitAnimations]; }
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[self.tabBarController.tabBar setHidden:YES];
转帖:http://stackoverflow.com/questions/5272290/how-to-hide-uitabbarcontroller
- UITabBarController 隐藏标签栏
- UITabBarController自定义标签栏
- UITabBarController 标签栏控制器
- UITabBarController标签栏控制器
- UITabBarController 标签栏控制器
- 35.标签栏(UITabBarController)
- UITabBarController 隐藏
- 隐藏UITabbarController
- 隐藏UITabBarController
- UITabBarController 隐藏
- Swift UITabBarController 标签栏控制器
- swift UITabBarController标签栏控制器
- UITabBarController(标签栏控制器)
- UITabBarController 标签栏控制器-IOS开发
- UITabBarController 标签栏控制器-IOS开发
- UITabBarController 标签栏控制器-IOS开发
- UITabBarController 标签栏控制器-IOS开发
- UITabBarController/分栏控制器/标签栏控制器
- Python解析json数据结构范例
- mysql replication 优化
- 关于asp.net服务器控件的格式化操作:Dropdownlist
- 如何远程连接服务器(转)
- 操作系统笔记(1)
- UITabBarController 隐藏标签栏
- Spring声明式事务管理、Spring整合Hibernate
- svn生成patch和打(导入)patch文件的方法
- 在Android的状态栏(statusbar)中增加menu,home和back快捷键的方法
- coro学习-击鼓传花
- FPGA 使用Active-HDL仿真时出现Cannot access SLP signal `/clk'. Use switch +access +r for this region.
- #pragma 编译器指令 转自百度
- 驱动工程师必备脚本
- 字符集和字符编码