change fillColor of selected CAShapeLayer
- by Frank
I'm trying to change the fillColor of a CAShapeLayer when the
layer it's contained in is touched.
I'm able to change the background color of the tapped layer like this:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
CALayer *layer = [(CALayer *)self.view.layer.presentationLayer hitTest:point];
layer = layer.modelLayer;
layer.backgroundColor = [UIColor blueColor].CGColor;
}
This turns the background of "layer" blue as expected.
My problem is how do I change the color of the CAShapelayer inside "layer"?
Thanks!