我想在X轴上旋转一个UILabel,并做动画效果。但是当动画开始时,标签的文本被水平切成两半。底部消失了,上半部分在旋转。为什么会这样呢?
以下是代码:
以下是代码:
CATransform3D _3Dt = CATransform3DMakeRotation(radians(90.0f), 1.0, 0.0, 0.0);
CABasicAnimation *transformAnimation = [CABasicAnimation animationWithKeyPath:@"transform"];
transformAnimation.removedOnCompletion = NO;
transformAnimation.toValue = [NSValue valueWithCATransform3D:_3Dt];
transformAnimation.fillMode = kCAFillModeForwards;
(sdk 3.0)