<!--
{
  "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/UIViewImplicitlyAnimating/addCompletion(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIViewImplicitlyAnimating(im)addCompletion:"
  },
  "title" : "addCompletion(_:)"
}
-->

# addCompletion(_:)

Adds the specified completion block to the animator.

```
optional 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 position where the animations stopped. Use this value to specify whether the animations stopped at their starting point, their end point, or their current position.

## 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(_:)`](/documentation/UIKit/UIViewAnimating/stopAnimation(_:)) method is called, do not execute any completion blocks if the `withoutFinishing` parameter for that method contains the value <doc://com.apple.documentation/documentation/Swift/true>. If the parameter is <doc://com.apple.documentation/documentation/Swift/false> and the client subsequent calls the [`finishAnimation(at:)`](/documentation/UIKit/UIViewAnimating/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.

---

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)