ProgressViewStyle

A type that applies standard interaction behavior to all progress views within a view hierarchy.

ProtocoliOS 14.0+macOS 11.0+tvOS 14.0+watchOS 7.0+ProgressViewStyle in SwiftUI

Declaration

React
type ProgressViewStyle =
  | 'automatic'
  | 'circular'
  | 'linear'
  | CircularProgressViewStyle
  | DefaultProgressViewStyle
  | LinearProgressViewStyle;
Swift
@MainActor @preconcurrency protocol ProgressViewStyle

Pass a literal, or build one with SwiftUI.ProgressViewStyle from import { SwiftUI } from 'swiftui-react-native'.

Type properties

  • 'automatic'SwiftUI.ProgressViewStyle.automatic

    The default progress view style in the current context of the view being styled.

  • 'circular'SwiftUI.ProgressViewStyle.circular

    The style of a progress view that uses a circular gauge to indicate the partial completion of an activity.

  • A progress view that visually indicates its progress using a horizontal bar.

Overview

To configure the current progress view style for a view hierarchy, use the View.progressViewStyle(_:) modifier.

A type conforming to this protocol inherits @preconcurrency @MainActor isolation from the protocol if the conformance is included in the type's base declaration:

struct MyCustomType: Transition {
    // `@preconcurrency @MainActor` isolation by default
}

Isolation to the main actor is the default, but it's not required. Declare the conformance in an extension to opt out of main actor isolation:

extension MyCustomType: Transition {
    // `nonisolated` by default
}

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Styles.