Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't clear group content #93

Closed
zapletnev opened this issue Feb 9, 2017 · 0 comments
Closed

Can't clear group content #93

zapletnev opened this issue Feb 9, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@zapletnev
Copy link
Contributor

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.

@zapletnev zapletnev added the bug label Feb 9, 2017
@zapletnev zapletnev added this to the 0.8.1 milestone Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants