Use the RiveViewModel API
mainThe high-level RiveViewModel API is the primary way to interact with Rive animations in UIKit and SwiftUI. Common tasks include:
- Setting a Rive file via a URL or a local asset in the app bundle.
- Configuring layout and loop mode options.
- Displaying single or multiple animations/artboards within a single component.
- Setting up and manipulating state machines using inputs.