更新时间:2023-02-02 17:32:20
看看这个博客文章。
示例:( label
= UILabel
)
// UIView's transform property is a CGAffineTransform.
[UIView beginAnimations:nil context:NULL]; // arguments are optional
view.transform = CGAffineTransformMakeRotation(M_PI_2);
[UIView commitAnimations];
// CALayer's transform property is a CATransform3D.
// rotate around a vector (x, y, z) = (0, 0, 1) where positive Z points
// out of the device's screen.
label.layer.transform = CATransform3DMakeRotation(M_PI_2, 0, 0, 1);