嗨我想制作一个像垂直窗口打开的效果,用CATransform3DRotate
旋转UIImageView。
我尝试了这段代码,但它是水平窗口打开。
CALayer *layer = img11.layer;
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;
rotationAndPerspectiveTransform.m34 = 1.0 / -500;
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, 45.0f/180.0 * 3.14, 0.0f, 1.0f, 0.0f);
layer.transform = rotationAndPerspectiveTransform;