We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For some reason touch events don't work from the first time. And after animation they don't work at all. Here is full example:
class MorphingView: MacawView { required init?(coder aDecoder: NSCoder) { super.init(node: MorphingView.newScene(), coder: aDecoder) } class func newScene() -> Node { let stroke = Stroke(width: 15.0, cap: .round) let contents1 = [ Shape(form: Line(x1: 90.0, y1: 110.0, x2: 210.0, y2: 110.0), stroke: stroke), Shape(form: Line(x1: 90.0, y1: 150.0, x2: 210.0, y2: 150.0), stroke: stroke), Shape(form: Line(x1: 90.0, y1: 190.0, x2: 210.0, y2: 190.0), stroke: stroke), ] let contents2 = [ Shape(form: Line(x1: 110.0, y1: 150.0, x2: 135.0, y2: 125.0), stroke: stroke), Shape(form: Line(x1: 110.0, y1: 150.0, x2: 190.0, y2: 150.0), stroke: stroke), Shape(form: Line( x1: 110.0, y1: 150.0, x2: 135.0, y2: 175.0), stroke: stroke), ] var switched = false let group = contents1.group() group.onTouchPressed { e in group.contentsVar.animate(to: switched ? contents1 : contents2) switched = !switched } return group } }
The text was updated successfully, but these errors were encountered:
vhailor13
No branches or pull requests
For some reason touch events don't work from the first time. And after animation they don't work at all. Here is full example:
The text was updated successfully, but these errors were encountered: