IOS零碎技术整理(2)-隐藏系统Tabbar
2013-09-05 11:09
369 查看
原理就是将tabbar移出显示区
-(void)hideSystemTabBar:(UITabBar*) tabbarcontroller {
[UIView beginAnimations:nil context:NULL];//动画效果,可以不用
[UIView setAnimationDuration:0.1];
for(UIView* view in tabbarcontroller.subviews)
{
if([view isKindOfClass:[UITabBarclass]])
{
[view setFrame:CGRectMake(view.frame.origin.x,WCGLOBAL_SCREEN_SIZE.height, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width,WCGLOBAL_SCREEN_SIZE.height)];
}
}
[UIView commitAnimations];
}
-(void)showSystemTabBar:(UITabBarController*) tabbarcontroller {
// [UIView beginAnimations:nil context:NULL];
// [UIView setAnimationDuration:0.5];
for(UIView* view in tabbarcontroller.view.subviews)
{
NSLog(@"%@", view);
if([view isKindOfClass:[UITabBarclass]])
{
[view setFrame:CGRectMake(view.frame.origin.x,WCGLOBAL_SCREEN_SIZE.height - WCTabBarHeight, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width,WCGLOBAL_SCREEN_SIZE.height - WCTabBarHeight)];
}
}
// [UIView commitAnimations];
}
-(void)hideSystemTabBar:(UITabBar*) tabbarcontroller {
[UIView beginAnimations:nil context:NULL];//动画效果,可以不用
[UIView setAnimationDuration:0.1];
for(UIView* view in tabbarcontroller.subviews)
{
if([view isKindOfClass:[UITabBarclass]])
{
[view setFrame:CGRectMake(view.frame.origin.x,WCGLOBAL_SCREEN_SIZE.height, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width,WCGLOBAL_SCREEN_SIZE.height)];
}
}
[UIView commitAnimations];
}
-(void)showSystemTabBar:(UITabBarController*) tabbarcontroller {
// [UIView beginAnimations:nil context:NULL];
// [UIView setAnimationDuration:0.5];
for(UIView* view in tabbarcontroller.view.subviews)
{
NSLog(@"%@", view);
if([view isKindOfClass:[UITabBarclass]])
{
[view setFrame:CGRectMake(view.frame.origin.x,WCGLOBAL_SCREEN_SIZE.height - WCTabBarHeight, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width,WCGLOBAL_SCREEN_SIZE.height - WCTabBarHeight)];
}
}
// [UIView commitAnimations];
}
相关文章推荐
- IOS零碎技术整理(1)-后台运行
- iOS 隐藏系统tabBar及需要push两层时候tabBar的隐藏方法
- IOS零碎技术整理(3)-获取wifi列表
- iOS开发之隐藏tabbar--解决隐藏后依然不能响应对应位置事件的问题 分类: ios技术 2015-04-21 11:24 261人阅读 评论(0) 收藏
- iOS 隐藏系统的tabbar后,tabbar所在frame区域不可点击问题
- 使用系统自带的TabBar的tabBarController,切换界面时,显示/隐藏tabBar
- IOS隐藏Tabbar
- iOS中一些零碎的整理
- iOS中显示和隐藏TabBar的动画效果
- iOS开发之隐藏tabbar--解决隐藏后依然不能响应对应位置事件的问题
- iOS开发之隐藏tabbar--解决隐藏后依然不能响应对应位置事件的问题
- <Swift>IOS隐藏push子界面的bottom tabbar
- IOS开发笔记之十四——使用系统相册或相机导致状态栏隐藏的问题(bug总结四)
- iOS将系统tabbar设置为透明
- iOS跳转界面时隐藏tabBar的方法(隐藏tabBar底部变黑)
- ios点击隐藏tabBar 返回tabBar
- IOS 单指点击空白区域隐藏键盘(贴项目中的代码,未整理)UITapGestureRecognizer
- 【ios 7】 之后的设置系统的状态栏隐藏的方法分享
- [iOS 自定义导航栏/导航条]隐藏系统导航条
- iOS开发之解决隐藏tabbar后原位置无法响应点击事件的问题