---
title: "setProgress(_:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiprogressview/setprogress(_:animated:)"
---

# setProgress(_:animated:)

Adjusts the current progress of the progress view, optionally animating the change.

## Declaration

```swift
func setProgress(_ progress: Float, animated: Bool)
```

## Parameters

- `progress`: The new progress value.
- `animated`: doc://com.apple.documentation/documentation/Swift/true if the change should be animated, doc://com.apple.documentation/documentation/Swift/false if the change should happen immediately.

## Discussion

Discussion The current progress is represented by a floating-point value between 0.0 and 1.0, inclusive, where 1.0 indicates the completion of the task. The default value is 0.0. Values less than 0.0 and greater than 1.0 are pinned to those limits.

## See Also

### Managing the progress bar

- [progress](uikit/uiprogressview/progress.md)
- [observedProgress](uikit/uiprogressview/observedprogress.md)
