<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewPropertyAnimator/addCompletion(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewPropertyAnimator(im)addCompletion:"
  },
  "title" : "addCompletion(_:)"
}
-->

# addCompletion(_:)

Adds the specified completion block to the animator.

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

## Parameters

`completion`

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

- finalPosition: The ending position of the animations. Use this value to determine whether the animations stopped at the beginning, end, or somewhere in the middle.

## Discussion

Completion blocks are executed after the animations finish normally. If you call the [`stopAnimation(_:)`](/documentation/UIKit/UIViewAnimating/stopAnimation(_:)) method, the completion blocks are not called if you specify <doc://com.apple.documentation/documentation/Swift/true> for the method’s parameter. If you specify <doc://com.apple.documentation/documentation/Swift/false> for the parameter, the animator executes the completion blocks normally after you call its [`finishAnimation(at:)`](/documentation/UIKit/UIViewAnimating/finishAnimation(at:)) method.

You may add completion blocks to an animator at any time, including while it is stopped.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)