Hey, so the problem is: if I add some action on node with method "onTouchPressed", I can't change that action to another, only append to existed actionArray. So I want to remove action from node or completly change to another, how can I do that?
let node = try! SVGParser.parse(path: "vectorPicture")
let myMacawClass = MacawView(node: node, frame:CGRect.init(x: 0, y: 0, width: 100, height: 100))
func registerForSelection(nodeTag: String) {
self.myMacawClass.node.nodeBy(tag: nodeTag)?.onTouchPressed({ (touch) in
let nodeShape = self.myMacawClass.node.nodeBy(tag: nodeTag) as! Shape
nodeShape.fill = Color.whiteSmoke
})
}
["1", "2," "3"].forEach { id in registerForSelection(nodeTag: id)}
Hey, so the problem is: if I add some action on node with method "onTouchPressed", I can't change that action to another, only append to existed actionArray. So I want to remove action from node or completly change to another, how can I do that?