如何旋转CALayer 90度?我需要旋转一切,包括子层和坐标系。
发布于 2010-07-29 12:02:31
Obj-C:
theLayer.transform = CATransform3DMakeRotation(90.0 / 180.0 * M_PI, 0.0, 0.0, 1.0);斯威夫特
theLayer.transform = CATransform3DMakeRotation(90.0 / 180.0 * .pi, 0.0, 0.0, 1.0)也就是说,转换层,使其旋转90度(π/2弧度),其中100%的旋转发生在z轴上。
https://stackoverflow.com/questions/3362180
复制相似问题