我有一个填充一些单元格的 UITable 视图。
很少有细胞具有旋转图像。使用动画旋转图像:
[image.layer removeAllAnimations];
CABasicAnimation* rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.duration = 1.0;
rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 * 1.0 * rotationAnimation.duration ];
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = HUGE_VALF;
[image.layer addAnimation:rotationAnimation forKey:nil];
由于某种原因,并非所有图像都有动画。似乎当我开始滚动表格时,一些动画被删除/禁用。
由于某些原因