rive-app/rive-ios

How to handle the completion of animation playback in SwiftUI

Closed this issue · 1 comments

Description

Is there a way to detect the completion of animation playback in SwiftUI?
Help appreciate, thanks!

Hi @Masataka-n you can listen to certain animation state changes that occur, see Player Delegates

But the new and better way is to make use of Rive Events. You can "report" any custom Rive event from a state machine. For example, when a button is pressed, or when an animation finishes, or at any point information needs to be sent from the animation to the runtime.

Take a look at our docs for events here: https://help.rive.app/runtimes/rive-events

Closing this issue for now. Feel free to reach out to us on Discord if you have implementation questions.