【发布时间】:2013-12-31 11:41:26
【问题描述】:
我有一个 CAShapeLayer,我可以使用 UIRotationGestureRecognizer 旋转它。但是在旋转时,它只旋转它的框架而不是它里面的填充图案。
CAShapeLayer *shapeLayer = [finalShapeLayersArray objectAtIndex:indextobeRotated];
CGPathRef path = createPathRotatedAroundBoundingBoxCenter(shapeLayer.path,recognizer.rotation);
shapeLayer.path = path;
CGPathRelease(path);
recognizer.rotation = 0;
这样做,它只会旋转 CAShapeLayer 的边界。我已经用图像填充了一个图案。我只是希望该模式也应该旋转。
【问题讨论】:
-
这些信息不足以回答您的问题。您需要编辑您的问题并更新您的设置的更详细描述,最好使用演示问题的代码。
标签: ios objective-c transform calayer