-
Notifications
You must be signed in to change notification settings - Fork 563
Closed
Description
class TestView: MacawView {
required init?(coder aDecoder: NSCoder) {
let ellipse = Ellipse(cx: w/2 - 80, cy: 110, rx: 60, ry: 60)
let shape = Shape(
form: Arc(ellipse: ellipse, extent: 2 * M_PI),
fill: Color.black,
stroke: Stroke(fill: Color(val: 0x744641), width: 8)
)
let contentGroup = Group(contents: [shape])
contentGroup.onTap { tapEvent in
contentGroup.contents = []
print("Cleared!")
}
super.init(node: contentGroup, coder: aDecoder)
}
}
Group content remains after receiving tap event.