CAShapeLayer
通过将其笔触颜色设置为红色,我创建了几个点.然后我用一种模式填充了颜色UIImage
.我想CAShapeLayer
用它的填充图案旋转它UIRotationGestureRecognizer
.
我使用过CATransform3DRotate,但它无法正常工作.
CATransform3D transform = CATransform3DIdentity;
transform = CATransform3DRotate(transform, recognizer.rotation, 0.0, 0.0, 1.0);
shapeLayer.transform = transform;
Run Code Online (Sandbox Code Playgroud)
提前致谢