<!--
{
  "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/init(duration:curve:animations:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewPropertyAnimator(im)initWithDuration:curve:animations:"
  },
  "title" : "init(duration:curve:animations:)"
}
-->

# init(duration:curve:animations:)

Initializes the animator with a built-in UIKit timing curve.

```
convenience init(duration: TimeInterval, curve: UIView.AnimationCurve, animations: (() -> Void)? = nil)
```

## Parameters

`duration`

The duration of the animation, in seconds.

`curve`

The UIKit timing curve to apply to the animation.

`animations`

The block containing the animations. This block has no return value and takes no parameters. Use this block to modify any animatable view properties. When you start the animations, those properties are animated from their current values to the new values using the specified animation parameters.

## Return Value

An initialized animator object or `nil` if the object could not be created.

## Discussion

Use this method to create an animator object that uses the existing UIKit timing curves to control the animation behavior. Standard UIKit timing curves include [`UIView.AnimationCurve.linear`](/documentation/UIKit/UIView/AnimationCurve/linear) and [`UIView.AnimationCurve.easeInOut`](/documentation/UIKit/UIView/AnimationCurve/easeInOut) among others.

The animator object returned by this method begins in the [`UIViewAnimatingState.inactive`](/documentation/UIKit/UIViewAnimatingState/inactive) state. You must explicitly start the animations by calling the [`startAnimation()`](/documentation/UIKit/UIViewAnimating/startAnimation()) 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)