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];
网友评论