<!--
{
  "availability" : [
    "iOS: 2.0.0 - 13.0.0",
    "iPadOS: 2.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/setAnimationBeginsFromCurrentState(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(cm)setAnimationBeginsFromCurrentState:"
  },
  "title" : "setAnimationBeginsFromCurrentState(_:)"
}
-->

# setAnimationBeginsFromCurrentState(_:)

Sets whether the animation should begin playing from the current state.

```
class func setAnimationBeginsFromCurrentState(_ fromCurrentState: Bool)
```

## Parameters

`fromCurrentState`

Specify <doc://com.apple.documentation/documentation/Swift/true> if animations should begin from their currently visible state; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

If set to <doc://com.apple.documentation/documentation/Swift/true> when an animation is in flight, the current view position of the in-flight animation is used as the starting state for the new animation. If set to <doc://com.apple.documentation/documentation/Swift/false>, the in-flight animation ends before the new animation begins using the last view position as the starting state. This method does nothing if an animation is not in flight or invoked outside of an animation block. Use the [`beginAnimations(_:context:)`](/documentation/UIKit/UIView/beginAnimations(_:context:)) class method to start and the [`commitAnimations()`](/documentation/UIKit/UIView/commitAnimations()) class method to end an animation block. The default value is <doc://com.apple.documentation/documentation/Swift/false>.

Use of this method is discouraged in iOS 4.0 and later. Instead, you should use the[`animate(withDuration:delay:options:animations:completion:)`](/documentation/UIKit/UIView/animate(withDuration:delay:options:animations:completion:)) method to specify your animations and the animation options.

---

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)