<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIProgressView/setProgress(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIProgressView(im)setProgress:animated:"
  },
  "title" : "setProgress(_:animated:)"
}
-->

# setProgress(_:animated:)

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

```
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

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.

---

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)