-
Notifications
You must be signed in to change notification settings - Fork 55
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
Animators in SwiftUI #24
Comments
Hey @matthewcheok, thanks for posting this! Glad you're excited about SwiftUI + Wave. I'm definitely not a SwiftUI expert, so I have a few questions:
|
I don't think its an issue in this specific instance but in general SwiftUI views are meant to be light-weight and could be instantiated many times.
AFAIK Another potential alternative way to drive the animation is to make the animator an
While neither are problems in your particular code example, I'd suggest the first change in terms of best practices. |
Really exciting that we're able to use Wave in SwiftUI. Couple of questions:
@State
to avoid instantiating new instances each time views are rendered?Wave/Sample App/Wave-Sample/Wave-Sample/SwitUIViewController.swift
Line 14 in ecf541b
boxOffset
and triggering a state change in SwiftUI - I wonder if there's a more performant way to do this?TimelineView
perhaps?Wave/Sample App/Wave-Sample/Wave-Sample/SwitUIViewController.swift
Line 16 in ecf541b
The text was updated successfully, but these errors were encountered: