---
title: "addCompletion(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiviewimplicitlyanimating/addcompletion(_:)"
---

# addCompletion(_:)

Adds the specified completion block to the animator.

## Declaration

```swift
optional func addCompletion(_ completion: @escaping (UIViewAnimatingPosition) -> Void)
```

```swift
optional func addCompletion() async -> UIViewAnimatingPosition
```

## Parameters

- `completion`: A block to execute when the animations finish. This block has no return value and takes the following parameter:

## Discussion

Discussion Use this method to add the completion blocks to your custom animator object. Completion blocks should execute after the animations finish successfully. If the stopAnimation(_:) method is called, do not execute any completion blocks if the withoutFinishing parameter for that method contains the value true. If the parameter is false and the client subsequent calls the finishAnimation(at:) method, execute the completion blocks in your implementation of that method. Your implementation must be able to handle multiple calls to this method.

## See Also

### Modifying animations

- [addAnimations(_:)](uikit/uiviewimplicitlyanimating/addanimations(_:).md)
- [addAnimations(_:delayFactor:)](uikit/uiviewimplicitlyanimating/addanimations(_:delayfactor:).md)
- [continueAnimation(withTimingParameters:durationFactor:)](uikit/uiviewimplicitlyanimating/continueanimation(withtimingparameters:durationfactor:).md)
