Contents

getTimelineAnimationBehavior(for:withHandler:)

Gets the animation behavior when transitioning between timeline entries.

Declaration

optional func getTimelineAnimationBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineAnimationBehavior) -> Void)
optional func timelineAnimationBehavior(for complication: CLKComplication) async -> CLKComplicationTimelineAnimationBehavior

Parameters

  • complication:

    The complication tied to the request. Use the complication family information in this object to determine which set of templates are valid.

  • handler:

    The handler to execute with the animation behavior. This block has no return value and takes the following parameter:

    behavior

    The animation behavior to use. For a list of possible values, see Clkcomplicationtimelineanimationbehavior.

Discussion

Only implement this method if your app supports Time Travel on watchOS 4 or earlier.

Implement this method if you want ClockKit to create transition animations between your timeline entries during Time Travel. Transition animations create softer transitions between different entries. You might use them when the value of an entry changes dramatically or when you change the template you’re using.

You can use group identifiers to eliminate transition animations between specific timeline entries. When animations are enabled, ClockKit creates animations only when the group identifier of successive timeline entries is different.

If you don’t implement this method, ClockKit doesn’t animate the transitions between timeline entries.

Topics

Animation Behaviors

See Also

Deprecated methods