Protocol

UIFocusAnimationContext

Information about focusing animations being performed by the system.

Declaration

protocol UIFocusAnimationContext

Overview

You do not adopt this protocol in your custom classes. When a focus update occurs and the system provides you with a UIFocusAnimationCoordinator object, you can use that object to specify custom focus-related animations. When the time comes for the system to execute your animations, it delivers an object that adopts this protocol to your animation block. The context object contains information about the system animations that you can use to configure the behavior of your own animations. For example, you might configure your animations to be exactly half the duration of the system animations.

Topics

Getting the Animation Attributes

var duration: TimeInterval

The duration (measured in seconds) of the focus animation.

Required.

Relationships

Inherits From

See Also

Adding Animations to Focus Updates

func addCoordinatedFocusingAnimations(((UIFocusAnimationContext) -> Void)?, completion: (() -> Void)?)

Runs the specified set of animations together with the system animations for adding focus to an item.

func addCoordinatedUnfocusingAnimations(((UIFocusAnimationContext) -> Void)?, completion: (() -> Void)?)

Runs the specified set of animations together with the system animations for removing focus from an item.

func addCoordinatedAnimations((() -> Void)?, completion: (() -> Void)?)

Specifies the animations to coordinate with the active focus animation.