IOS零碎技术整理(2)-隐藏系统Tabbar
原理就是将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];
}
最新文章
- 【原】JAVA开发环境搭建
- Bootstrap框架(基础篇)
- PAT 1003. 我要通过!(20) JAVA
- (译文)MVC通用仓储类
- [NOIP2014] 提高组 洛谷P1941 飞扬的小鸟
- js日历插件 中文、英文日历
- php数组的创建及操作
- 51nod1313 完美串
- C++ 排序函数 sort(),qsort()的含义与用法 ,字符串string 的逆序排序等
- Palindrome(Manacher)
- TP框架 基础1
- RabbitMQ和SpringBoot的简单整合列子
- 从零开始学习前端JAVASCRIPT — 3、JavaScript基础string字符串介绍
- Android开发技巧——高亮的用户操作指南
- eclipse JVM 性能调优
- .net core DI 注册 Lazy<;>; 类型
- JS中var、let、const区别? 用3句话概括
- CGPoint,CGSize,CGRect转NSString以及CGRect的一些便捷实用方法
- 【adaboost】周志华
- kubernetes 实战6_命令_Share Process Namespace between Containers in a Pod&;Translate a Docker Compose File to Kubernetes Resources