---
title: "addCoordinatedAnimations(_:completion:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uifocusanimationcoordinator/addcoordinatedanimations(_:completion:)"
---

# addCoordinatedAnimations(_:completion:)

Specifies the animations to coordinate with the active focus animation.

## Declaration

```swift
func addCoordinatedAnimations(_ animations: (() -> Void)?, completion: (() -> Void)? = nil)
```

## Parameters

- `animations`: The animation to be run.
- `completion`: A block object to be executed after the main animation completes. Any animations specified are run in the same animation context as the main animation.

## Discussion

Discussion Use this method to coordinate your custom animations with the system animations for adding or removing focus. Unless the duration time is inherited, the specified animations may not run in the same context as the main animation. It is perfectly legitimate to specify only a completion block.

## See Also

### Adding animations to focus updates

- [addCoordinatedFocusingAnimations(_:completion:)](uikit/uifocusanimationcoordinator/addcoordinatedfocusinganimations(_:completion:).md)
- [addCoordinatedUnfocusingAnimations(_:completion:)](uikit/uifocusanimationcoordinator/addcoordinatedunfocusinganimations(_:completion:).md)
- [UIFocusAnimationContext](uikit/uifocusanimationcontext.md)
