<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ProgressView/init(timerInterval:countsDown:label:currentValueLabel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12ProgressViewV13timerInterval10countsDown5label17currentValueLabelACyxq_GSNy10Foundation4DateVG_SbxyXEq_yXEtcfc"
  },
  "title" : "init(timerInterval:countsDown:label:currentValueLabel:)"
}
-->

# init(timerInterval:countsDown:label:currentValueLabel:)

Creates a progress view for showing continuous progress as time passes,
with descriptive and current progress labels.

```
nonisolated init(timerInterval: ClosedRange<Date>, countsDown: Bool = true, @ContentBuilder label: () -> Label, @ContentBuilder currentValueLabel: () -> CurrentValueLabel)
```

## Parameters

`timerInterval`

The date range over which the view should progress.

`countsDown`

A Boolean value that determines whether the view
empties or fills as time passes. If `true` (the default), the
view empties.

`label`

An optional view that describes the purpose of the progress
view.

`currentValueLabel`

A view that displays the current value of the
timer.

## Discussion

Use this initializer to create a view that shows continuous progress
within a date range. The following example initializes a progress view
with a range of `start...end`, where `start` is 30 seconds in the past
and `end` is 90 seconds in the future. As a result, the progress view
begins at 25 percent complete. This example also provides custom views
for a descriptive label (Progress) and a current value label that shows
the date range.

```
struct ContentView: View {
    let start = Date().addingTimeInterval(-30)
    let end = Date().addingTimeInterval(90)

    var body: some View {
        ProgressView(timerInterval: start...end,
                     countsDown: false) {
            Text("Progress")
        } currentValueLabel: {
            Text(start...end)
         }
     }
}
```

![A horizontal bar that represents progress, partially filled in from](images/com.apple.SwiftUI/ProgressView-6-macOS@2x.png)

By default, the progress view empties as time passes from the start of
the date range to the end, but you can use the `countsDown` parameter to
create a progress view that fills as time passes, as the above example
demonstrates.

> Note: Date-relative progress views, such as those created with this
> initializer, don’t support custom styles.

---

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)