---
title: "runningPropertyAnimator(withDuration:delay:options:animations:completion:)"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uiviewpropertyanimator/runningpropertyanimator(withduration:delay:options:animations:completion:)"
---

# runningPropertyAnimator(withDuration:delay:options:animations:completion:)

Creates and returns an animator object that begins running its animations immediately.

## Declaration

```swift
class func runningPropertyAnimator(withDuration duration: TimeInterval, delay: TimeInterval, options: UIView.AnimationOptions = [], animations: @escaping () -> Void, completion: ((UIViewAnimatingPosition) -> Void)? = nil) -> Self
```

## Parameters

- `duration`: The duration of the animation, in seconds.
- `delay`: The number of seconds to wait before starting the animations. Specify 0 to begin the animations immediately.
- `options`: The options to apply to the animations. You can specify most options, but transition-related options and options related to the animation direction are ignored. For a list of options, see doc://com.apple.uikit/documentation/UIKit/UIView/AnimationOptions.
- `animations`: The block containing the animations. This block has no return value and takes no parameters. Use this block to modify any animatable properties of your view. Those properties are animated from their current values to the new values using the specified animation parameters.
- `completion`: The block to execute when the animations finish. You can use this block to perform any final actions. This block has no return value and takes the following parameter:

## Return Value

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

## Discussion

Discussion This method creates the property animator object, configures it, and calls its startAnimation() method after the specified delay. If you don’t specify an animation curve in the options parameter, this method uses the curveEaseInOut option.

## See Also

### Initializing a property animator

- [init(duration:curve:animations:)](uikit/uiviewpropertyanimator/init(duration:curve:animations:).md)
- [init(duration:controlPoint1:controlPoint2:animations:)](uikit/uiviewpropertyanimator/init(duration:controlpoint1:controlpoint2:animations:).md)
- [init(duration:dampingRatio:animations:)](uikit/uiviewpropertyanimator/init(duration:dampingratio:animations:).md)
- [init(duration:timingParameters:)](uikit/uiviewpropertyanimator/init(duration:timingparameters:).md)
