-
-
Notifications
You must be signed in to change notification settings - Fork 416
Progress Views
Vatsal Manot edited this page Aug 14, 2019
·
5 revisions
A view that shows that a task is in progress.
public struct ActivityIndicator: View {
public init()
/// Declares the content and behavior of this view.
public var body: some View { get }
public func animated(_ isAnimated: Bool) -> ActivityIndicator
}
Example usage:
ActivityIndicator()
.animated(true)
A linear view that depicts the progress of a task over time.
public struct ProgressBar: View {
public init(_ value: CGFloat)
/// Declares the content and behavior of this view.
public var body: some View { get }
}
Example usage:
ProgressBar(0.5)
.frame(height: 20)
.foregroundColor(.blue)
A circular view that depicts the progress of a task over time.
public struct CircularProgressBar: View {
public init(_ value: CGFloat)
/// Declares the content and behavior of this view.
public var body: some View { get }
/// Sets the line width of the view.
public func lineWidth(_ lineWidth: CGFloat) -> CircularProgressBar
}
Example usage:
CircularProgressBar(0.5)
.lineWidth(2)
.foregroundColor(.blue)
.frame(height: 100)
If you see any problems with the content above, please file an issue here.