---
title: "getTimelineAnimationBehavior(for:withHandler:)"
framework: clockkit
role: symbol
role_heading: Instance Method
path: "clockkit/clkcomplicationdatasource/gettimelineanimationbehavior(for:withhandler:)"
---

# getTimelineAnimationBehavior(for:withHandler:)

Gets the animation behavior when transitioning between timeline entries.

## Declaration

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

```swift
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:

## Discussion

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

- [CLKComplicationTimelineAnimationBehavior](clockkit/clkcomplicationtimelineanimationbehavior.md)

## See Also

### Deprecated methods

- [CLKLaunchedTimelineEntryDateKey](clockkit/clklaunchedtimelineentrydatekey.md)
- [CLKLaunchedComplicationIdentifierKey](clockkit/clklaunchedcomplicationidentifierkey.md)
- [getComplicationDescriptors(handler:)](clockkit/clkcomplicationdatasource/getcomplicationdescriptors(handler:).md)
- [handleSharedComplicationDescriptors(_:)](clockkit/clkcomplicationdatasource/handlesharedcomplicationdescriptors(_:).md)
- [getLocalizableSampleTemplate(for:withHandler:)](clockkit/clkcomplicationdatasource/getlocalizablesampletemplate(for:withhandler:).md)
- [getPrivacyBehavior(for:withHandler:)](clockkit/clkcomplicationdatasource/getprivacybehavior(for:withhandler:).md)
- [CLKComplicationPrivacyBehavior](clockkit/clkcomplicationprivacybehavior.md)
- [getAlwaysOnTemplate(for:withHandler:)](clockkit/clkcomplicationdatasource/getalwaysontemplate(for:withhandler:).md)
- [getTimelineEndDate(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineenddate(for:withhandler:).md)
- [getCurrentTimelineEntry(for:withHandler:)](clockkit/clkcomplicationdatasource/getcurrenttimelineentry(for:withhandler:).md)
- [getTimelineEntries(for:after:limit:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineentries(for:after:limit:withhandler:).md)
- [CLKComplicationTimelineAnimationBehavior](clockkit/clkcomplicationtimelineanimationbehavior.md)
- [getSupportedTimeTravelDirections(for:withHandler:)](clockkit/clkcomplicationdatasource/getsupportedtimetraveldirections(for:withhandler:).md)
- [CLKComplicationTimeTravelDirections](clockkit/clkcomplicationtimetraveldirections.md)
- [getTimelineStartDate(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelinestartdate(for:withhandler:).md)
