---
title: duration
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiviewpropertyanimator/duration
---

# duration

The total duration (in seconds) of the main animations.

## Declaration

```swift
var duration: TimeInterval { get }
```

## Discussion

Discussion You set the duration value when creating the animator and cannot change it later. Animations added while the animator is in the inactive state are run for the specified duration. Animations added later run only for the remaining time, which is determined by the formula (1.0 - fractionComplete) * duration.

## See Also

### Accessing the animation parameters

- [delay](uikit/uiviewpropertyanimator/delay.md)
- [timingParameters](uikit/uiviewpropertyanimator/timingparameters.md)
- [isInterruptible](uikit/uiviewpropertyanimator/isinterruptible.md)
- [isUserInteractionEnabled](uikit/uiviewpropertyanimator/isuserinteractionenabled.md)
- [isManualHitTestingEnabled](uikit/uiviewpropertyanimator/ismanualhittestingenabled.md)
- [scrubsLinearly](uikit/uiviewpropertyanimator/scrubslinearly.md)
- [pausesOnCompletion](uikit/uiviewpropertyanimator/pausesoncompletion.md)
