You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to call riveViewModel.triggerInput before riveViewModel.view() initializes riveViewModel.riveView, the desired animation state is not reflected correctly in the view after initialization.
More specifically, the target triggerInput is triggerInput(“isActive”).
This is done by calling a function setDefaultState in init. We call the function in init to easily reproduce events, but in our actual project, we call them from the outside.
It is possible that our stateMachine is not created in the right way.
Provide a Repro
Please clone my fork and checkout triggerIssue branch.
I created a file ReproViewController.swift and added it to the preview app table item for you to review.
Source .riv/.rev file
Included in the forked repository. favorite_animation.riv
Expected behavior
Even if riveViewModel.triggerInput(“isActive”) is called before riveViewModel.view(), I want the view after initialization to correctly reflect riveViewModel.triggerInput(“isActive”) animation state (favorite button is active) correctly.
Screenshots
It refers to the state that the screen already looks like this image when it is opened.
Device & Versions (please complete the following information)
Device: iOS Simulator, iPhone 15 Pro
iOS version: iOS 17.4
Additional context
The state machine in this .riv file looks like the following capture. I may be wrong about how to create this state machine, in which case please point this out to me.
The text was updated successfully, but these errors were encountered:
Is there a way to set initial state on startup? I'm also seeing similar issues where if I set certain text runs or triggers prior to Rive being fully initialized it says in the initial state.
Description
When attempting to call
riveViewModel.triggerInput
beforeriveViewModel.view()
initializesriveViewModel.riveView
, the desired animation state is not reflected correctly in the view after initialization.More specifically, the target triggerInput is
triggerInput(“isActive”)
.This is done by calling a function
setDefaultState
ininit
. We call the function ininit
to easily reproduce events, but in our actual project, we call them from the outside.It is possible that our stateMachine is not created in the right way.
Provide a Repro
ReproViewController.swift
and added it to the preview app table item for you to review.Source
.riv
/.rev
fileIncluded in the forked repository.
favorite_animation.riv
Expected behavior
Even if
riveViewModel.triggerInput(“isActive”)
is called beforeriveViewModel.view()
, I want the view after initialization to correctly reflectriveViewModel.triggerInput(“isActive”)
animation state (favorite button is active) correctly.Screenshots
It refers to the state that the screen already looks like this image when it is opened.
Device & Versions (please complete the following information)
Additional context
The state machine in this .riv file looks like the following capture. I may be wrong about how to create this state machine, in which case please point this out to me.
The text was updated successfully, but these errors were encountered: