1.2D旋转:
testView.transform = CGAffineTransformMakeRotation(3.14/3);
2.3D旋转
CALayer *layer = testView.layer;CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;rotationAndPerspectiveTransform.m34 = 1.0 / -500;rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, 45.0f * M_PI / 180.0f, 0.0f, 1.0f, 0.0f);layer.transform = rotationAndPerspectiveTransform;
3.缩放:
CGAffineTransform transform = testView.transform;transform = CGAffineTransformScale(transform, 2,2);testView.transform = transform;