What is the difference between using CATransform3DRotate and using CABasicAnimation?

what is the difference between using CATransform3DRotate and [CABasicAnimation animationWithKeyPath:@ "transform.rotation.z"]?

Today, we encountered a problem. Using CATransform3DRotate to rotate around the z axis caused the view bounds to change. Later, we found that the coordinate system had changed after setting it with CATransform3DRotate. It was not possible to update the layout for layer again (set the frame operation), otherwise the view would be deformed.

but if you use CABasicAnimation to rotate around the z axis, setting the frame operation again will not be affected, and the view behaves normally, that is to say, its coordinate system has not changed? (self-guess)

so what"s the difference between the two approaches at the bottom? Solve

Mar.30,2021
Menu