40.iOS循环播放雷达扫描动画--Life365中的开启定位
2015-09-01 17:28
417 查看
//循环播放动画
_locationImageView.image = [UIImage imageNamed:@"scanning"];
CABasicAnimation *animation = [CABasicAnimationanimationWithKeyPath:@"transform.rotation.z"];
animation.fromValue = @(0);
animation.toValue = @(2*M_PI);
animation.duration = 1.f;//
animation.repeatCount = INT_MAX;//重复时间
[_locationImageView.layer addAnimation:animationforKey:@"keyFrameAnimation"];
[self.layer removeAllAnimations];//移除动画
_locationImageView.image = [UIImage imageNamed:@"scanning"];
CABasicAnimation *animation = [CABasicAnimationanimationWithKeyPath:@"transform.rotation.z"];
animation.fromValue = @(0);
animation.toValue = @(2*M_PI);
animation.duration = 1.f;//
animation.repeatCount = INT_MAX;//重复时间
[_locationImageView.layer addAnimation:animationforKey:@"keyFrameAnimation"];
[self.layer removeAllAnimations];//移除动画
相关文章推荐
- 网页一键分享按钮HTML代码
- NodePad++ 添加NppaStyle.dll问题
- JavaScript中this详解
- 前端知识点大全【转载】
- JS初级学习笔记(2)
- JS实现的自定义右键菜单实例二则
- Web前端学习书籍
- jsp实现文件上传下载的程序示例
- datagrid 给符合条件的数据设置样式
- JS操作Button、Select和Radio
- Node.js开发入门—HelloWorld再分析
- Javascript模块化编程(二):AMD规范
- js参数传递分析
- JSP - Actions
- 几种常用JSON库性能比较
- 控制所生成的servlet的结构: JSP page指令
- Javascript模块化编程(一):模块的写法
- CSS中的行为(css中使用js文件)——expression
- [转]七天学会NodeJS
- AngularJS小示例<2>