뇌졸중 색을 빨간색으로 설정하여 소수점이있는 CAShapeLayer
을 만들었습니다. 다음 나는 UIImage
의 본으로 색깔을 채웠다. UIRotationGestureRecognizer
을 사용하여 채워진 패턴과 함께 CAShapeLayer
을 회전시키고 싶습니다.CAShapeLayer의 중심점을 회전하는 방법
CATransform3DRotate를 사용했지만 제대로 작동하지 않습니다. 사전에
CATransform3D transform = CATransform3DIdentity;
transform = CATransform3DRotate(transform, recognizer.rotation, 0.0, 0.0, 1.0);
shapeLayer.transform = transform;
감사
이
내가이 사용했던 대답은 [여기] (http://stackoverflow.com/a/8232192/1161906) – bcattle