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

# stopAnimation(_:)

Stops the animations at their current positions.

```
func stopAnimation(_ withoutFinishing: Bool)
```

## Parameters

`withoutFinishing`

A Boolean indicating whether any final actions should be performed. Specify <doc://com.apple.documentation/documentation/Swift/true> to clear any animations and move the animator directly to the [`UIViewAnimatingState.inactive`](/documentation/UIKit/UIViewAnimatingState/inactive) state without performing any final actions. Specify <doc://com.apple.documentation/documentation/Swift/false> to put the animator into the [`UIViewAnimatingState.stopped`](/documentation/UIKit/UIViewAnimatingState/stopped) state.

## Discussion

Call this method when you want to end the animations at their current position. This method removes all of the associated animations from the execution stack and sets the values of any animatable properties to their current values. This method also updates the state of the animator object based on the value of the `withoutFinishing` parameter.

If you specify <doc://com.apple.documentation/documentation/Swift/false> for the `withoutFinishing` parameter, you can subsequently call the [`finishAnimation(at:)`](/documentation/UIKit/UIViewAnimating/finishAnimation(at:)) method to perform the animator’s final actions. For example, a [`UIViewPropertyAnimator`](/documentation/UIKit/UIViewPropertyAnimator) object executes its completion blocks when you call this method. You do not have to call the [`finishAnimation(at:)`](/documentation/UIKit/UIViewAnimating/finishAnimation(at:)) method right away, or at all, and you can perform other animations before calling that 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)