8
レイヤーがタッチされている場合、CAShapeLayerのfillColorを変更しようとしています。 は、私はこのようなタップ層の背景色を変更することができるよ:予想通り選択したCAShapeLayerのfillColorを変更します
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
CALayer *layer = [(CALayer *)self.view.layer.presentationLayer hitTest:point];
layer = layer.modelLayer;
layer.backgroundColor = [UIColor blueColor].CGColor;
}
これは、「層」の青色の背景になります。 私の問題は、「レイヤー」内のCAShapelayerの色を変更する方法です。 ありがとう!