1 CATransform3D transform = CATransform3DIdentity; 2 3 // 修改transform的m34达到透视效果 4 // - 1.0 / (500 ~ 1000 效果最好!) 5 // 注意:一定要放在3D前面,顺序不能换,分母越小效果越明显 6 transform.m34 = -1.0 / 1000; 7 8 transform = CATransform3DRotate(transform, M_PI_4, 0, 1, 0); 9 10 _redLayer.transform = transform;