-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Description
Description
I'm trying to set a property on a Rive animation instance right after binding, like this:
intro.riveModel?.enableAutoBind { instance in
print("before:", instance.colorProperty(fromPath: "Icon BG")?.value)
instance.colorProperty(fromPath: "Icon BG")?.value = .black
print("after:", instance.colorProperty(fromPath: "Icon BG")?.value)
}
But the color doesn't actually update in the UI until I set it again later (e.g., in a button action):
instance?.colorProperty(fromPath: "Icon BG")?.value = .black
The binding is being done as part of .onAppear() and all the properties of the instance seem to be reset later once.
Also, I tried using non-auto binding and seeing the same issue.
Why does setting the color in enableAutoBind not immediately update the UI, but works when set again later?
Provide a Repro
Source .riv/.rev file
Expected behavior
Screenshots
Device & Versions (please complete the following information)
- Device: [e.g. iOS Simulator, iPhone 12]
- iOS version [e.g. iOS 15]