rive-ios
rive-ios copied to clipboard
Animation (trigger) randomly stop working
Description
The animations of the button does not always work. When programming, it works in one build and in the next, even though you haven't changed anything, it doesn't work again. In the video I just close and open the app and it doesn't work anymore. The animation of the button at the bottom just not show up.
Provide a Repro
I could not always reproduce the error myself.
Source .riv
/.rev
file
The code is a stripped down version of the video below.
Expected behavior
The animations should run smoothly every time. Furthermore, the animations should also work when you open the app again. You close and open the app several times a day.
Screenshots
See the attached Video
There are 3 animations that I want to focus on in the video.
- The button animation itself
- The check animation
- The confetti
During the black bar, I just restarted the app and then pressed the button again. No animation is played. The only animation that works is the "check animation".
Device & Versions (please complete the following information)
-
Device: iOS Simulator iPhone 13, iPhone 13 Pro
-
iOS version 15.6
Additional context
I haven't been able to find out what exactly is causing this behavior until now. Sometimes it works perfectly for me and then it suddenly the animation doesn't work again without even restarting the app.
The source that you provided doesn't have the full app source. So I couldn't test in the full context of the working app, but I did get it running with the AddView as the root View. I did see the same issue that you saw in your post however it was fixed by commenting out the show.toggle()
line in the logIn()
func. Don't know what knock-on effects that will have for your app, but that did seem to be the cause of the problem. Also, I would recommend adding a check.triggerInput("Reset")
line in one of your async timers so that the check mark state machine resets to the beginning.
Ok, I'll try that. Can I send you the whole project via E-Mail? I don't want that my whole src on a public GitHub issue.
@derech1e If you are still experiencing the issue after trying @duncandoit 's suggestion, you can log a Support ticket here and share the project with us directly.
Going to close this issue as its pretty old and a solution has been provided. If you are still experiencing problems with animation triggers not working please do reopen the issue.