AnimationEvents
enum · iOS 13.0+ · SDK 27.1
enum AnimationEventsNotable milestones that the framework signals during animation playback. This enumeration defines the playback states that an animated entity can indicate to an app. To receive notification of a particular event, create a completion handler: ```swift private func onAnimationCompleted(_ event: AnimationEvents.PlaybackCompleted) { // Define code that runs when the animation completes. } ``` Then, subscribe the handler on the entity for the state of interest: ```swift // Get an animation. let animationName = entity.availableAnimations.first!.name! // Pass the animation to an entity and get a controller. entity.playAnimation(named: animationName, transitionDuration: 0.0) entitySubscription = view.scene.publisher(for: AnimationEvents.PlaybackCompleted.self, on: entity) .sink(receiveValue: onAnimationCompleted) ```
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
No declarations were skipped in this snapshot.