文件名称:绕Y轴相反的旋转变换-intel单cpu芯片组上电时序
文件大小:20.35MB
文件格式:PDF
更新时间:2024-07-30 20:55:39
iOS动画, core animation, 核心动画
清单5.8 绕Y轴相反的旋转变换 - (void)viewDidLoad { [super viewDidLoad]; //rotate the outer layer 45 degrees CATransform3D outer = CATransform3DIdentity; outer.m34 = -1.0 / 500.0; outer = CATransform3DRotate(outer, M_PI_4, 0, 1, 0); self.outerView.layer.transform = outer; //rotate the inner layer -45 degrees CATransform3D inner = CATransform3DIdentity; inner.m34 = -1.0 / 500.0; inner = CATransform3DRotate(inner, -M_PI_4, 0, 1, 0); self.innerView.layer.transform = inner; } 预期的效果应该如图5.17所示。 图5.17 绕Y轴做相反旋转的预期结果。 ios核心动画高级技巧 1033D变换