Event callbacks
The DotLottieAnimation
instance emits the following events that can be listened to via a class implementing the Observer
protocol:
Event | Description |
---|---|
onComplete | Emitted when the animation completes. |
onFrame(frameNo: Float) | Emitted when the animation reaches a new frame. |
onLoad | Emitted when the animation is loaded. |
onLoadError | Emitted when the animation failed to load. |
onLoop(loopCount: UIint32) | Emitted when the animation completes a loop. |
onPause | Emitted when the animation is paused. |
onPlay | Emitted when the animation starts playing. |
onRender(frameNo: Float) | Emitted when the frame is rendered. |
onStop | Emitted when the animation is stopped. |