tabBarItem 设置动画 animation
来源:互联网 发布:风云绝世坐骑进阶数据 编辑:程序博客网 时间:2024/05/29 14:49
tabBarItem 点击的时候 能否设置一个好看的动画 下面的代码可以实现
- (void)tabBarController:(UITabBarController *)theTabBarController didSelectViewController:(UIViewController *)viewController
{
[viewController.tabBarItemsetBadgeValue:@"3"];
NSMutableArray *arrayBt = [NSMutableArrayarray];
for (id tabBt in [theTabBarController.tabBar subviews])
{
NSLog(@"~~~~~~~%@",tabBt);
if ([tabBtisKindOfClass:NSClassFromString(@"UITabBarButton")])
{
[arrayBt addObject:tabBt];
}
}
UIView *view = [arrayBtobjectAtIndex:tabBarController.selectedIndex];
int i=0;
for (id tmp in [view subviews])
{
NSLog(@"--------%@",tmp);
i++;
if ([tmpisKindOfClass: NSClassFromString(@"UITabBarSelectionIndicatorView")])
{
//
break;
}
}
CATransition *transition = [CATransitionanimation];
transition.duration = 1.0f;
transition.timingFunction = [CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromBottom;
[[[[view subviews]objectAtIndex:i]layer]addAnimation:transition forKey:nil];
}
- tabBarItem 设置动画 animation
- TabBarItem切换动画
- 设置morenavigationcontroller的tabbaritem
- 设置tabBarItem图片渲染
- Android中xml设置Animation动画
- ios页面跳转动画设置 animation
- android tween animation 补间动画 xml设置动画属性
- tabBarItem设置背景色,标题
- tabbaritem的字体颜色设置
- 设置tabBarItem的图片渲染
- Animation动画效果设置和Interpolator的设置
- Animation 动画
- Animation动画
- 动画Animation
- 动画Animation
- Animation(动画)
- Animation动画
- animation动画
- hibernate常用包简介
- Htmlayout模拟实例一
- VMware 虚拟机的安装调试
- Makefile与内核的编译
- EasyUI combobox实现google提示
- tabBarItem 设置动画 animation
- servlet调用图
- Android全格式播放器开发(第一节ffplay编译)
- SSDP Protocol
- 球谐函数小结
- iOS开发Icon图标设置
- sql Server 数据库发送邮件
- 【ffmpeg-0.11.1移植到windows】【网络方面遇到的问题】【中文设备名问题】
- VIM 要學得好,一定要看懂 正規表示式 (Regular Expression)