I have a CAShapeLayer, I am able to rotate it using UIRotationGestureRecognizer. But when rotating, it only rotate its frame not the filled pattern inside it.
CAShapeLayer *shapeLayer = [finalShapeLayersArray objectAtIndex:indextobeRotated];
CGPathRef path = createPathRotatedAroundBoundingBoxCenter(shapeLayer.path,recognizer.rotation);
shapeLayer.path = path;
CGPathRelease(path);
recognizer.rotation = 0;
Bu doing this, it only rotates the boundary of the CAShapeLayer. I have filled a pattern with an image. I just want that pattern should also be rotated.