您的位置:首页 > Web前端

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];//移除动画
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: