2

我使用此代码将无尽的旋转动画添加到视图层

CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat:toValue];
rotationAnimation.duration = 0.7;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = HUGE_VALF;
rotationAnimation.removedOnCompletion = NO;
[animatingView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];

在某些情况下,我需要隐藏 animatingView 并将动画保留在其中。在这种情况下,动画渲染会发生什么?隐藏层中的动画会消耗设备的资源吗?

4

0 回答 0