CAKeyframeAnimation *anima = [CAKeyframeAnimation animation];
anima.keyPath = @"transform.rotation";
anima.values = @[@(angleValue(-1)),@(angleValue(1)),@(angleValue(-1))];
anima.repeatCount=MAXFLOAT;
添加动画
[self.layer addAnimation:anima forKey:@"editDrugAnimation"];
删除动画
[self.layer removeAnimationForKey:@"editDrugAnimation"];
网友评论