iOS 通过添加动画让一个view不停的旋转
作者:
苏坡乔 | 来源:发表于
2016-09-12 14:44 被阅读715次 UIImageView *imageview = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cateringzone"]];
[self.view addSubview: imageview];
CABasicAnimation *layer = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
layer.toValue = @(2*M_PI);
layer.duration = 5;
layer.removedOnCompletion = false;
layer.repeatCount = MAXFLOAT;
[imageview.layer addAnimation:layer forKey:nil];
本文标题:iOS 通过添加动画让一个view不停的旋转
本文链接:https://www.haomeiwen.com/subject/zjppettx.html
网友评论