UITabBar动态的隐藏和显示
来源:互联网 发布:北邮图书馆软件 编辑:程序博客网 时间:2024/05/29 04:45
#import <UIKit/UIKit.h>
//继承UITabBarController类,实现UITabBar的收缩
@interface UITabBarController (ShowHideBar)
- (void)hideTabBar;
- (void)showTabBar;
@end
#import "UITabBarController+ShowHideBar.h"
#import "Definition.h"
@implementation UITabBarController (ShowHideBar)
- (void)hideTabBar
{
for(UIView *view inself.view.subviews)
{
if([view isKindOfClass:[UITabBar class]])
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
[view setFrame:CGRectMake(view.frame.origin.x, ScreenHeight, view.frame.size.width,
view.frame.size.height)];
[UIView commitAnimations];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y,
view.frame.size.width, ScreenHeight)];
}
}
}
- (void)showTabBar
{
for(UIView *view inself.view.subviews)
{
if([view isKindOfClass:[UITabBar class]])
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
[view setFrame:CGRectMake(view.frame.origin.x, ScreenHeight-49, view.frame.size.width,
view.frame.size.height)];
[UIView commitAnimations];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y,
view.frame.size.width, ScreenHeight-49)];
}
}
}
@end
- UITabBar动态的隐藏和显示
- iOS UITabBar的隐藏和显示
- UITabBar的隐藏与显示
- iOS UITabBar的隐藏显示
- UITabBar显示隐藏解决方案
- UITabBar,UINavigationBar的布局和隐藏问题
- UITabBar自定义tabbar如何隐藏和显示,超实用
- 层的动态显示和隐藏
- Android 状态栏的动态显示和隐藏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- 动态显示和隐藏状态栏
- PHP 实现定时任务的几种方法
- window.attachEvent和window.addEventListener的区别(其实只是支持的浏览器不同)
- 安装GoLang编译环境
- 初学C语言的感悟——书山有路勤为径。
- Android Appliction 使用解析
- UITabBar动态的隐藏和显示
- java 重定向和转发的区别
- top命令
- Linux 上常见的 IO 基准测试工具比较dd/orion/iozone/bonnie++
- homebrew安装指定版本的软件
- 如何让关键词快速占领搜索引擎首页
- NFS服务器 实现宿主机与开发板同步
- 网络字节序与主机字节序
- MFC内置TBBUTTON结构