ProgressView
public struct ProgressView : View
Wrapper of UIProgressView A view that depicts the progress of a task over time.
The UIProgressView class provides properties for managing the style of the progress bar and for getting and setting values that are pinned to the progress of a task. For an indeterminate progress indicator—or, informally, a “spinner”—use an instance of the UIActivityIndicatorView class.
ProgressView(0.5)
.width(100)
.height(10)
.backgroundColor(.brown)
-
the node behind the ProgressView
Declaration
Swift
public var node: ArgoKitNode? { get }
-
init the ProgressView
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.
Declaration
Swift
public init(_ progress: @autoclosure @escaping () -> Float?)
Parameters
progress
The current progress shown by the receiver.
-
init the ProgressView use the progress object to use for updating the progress view.
When this property is set, the progress view updates its progress value automatically using information it receives from the Progress object. (Progress updates are animated.) Set the property to nil when you want to update the progress manually. The default value of this property is nil. For more information about configuring a progress object to manage progress information, see Progress.
Declaration
Swift
@available(iOS 9.0, *) public init(_ observedProgress: @autoclosure @escaping () -> Progress)
Parameters
observedProgress
the progress object
-
init the ProgressView use the current graphical style of the receiver.
The value of this property is a constant that specifies the style of the progress view. The default style is UIProgressView.Style.default. For more on these constants, see UIProgressView.Style.
Declaration
Swift
public init(progressViewStyle style: @autoclosure @escaping () -> UIProgressView.Style)
Parameters
style
the style
-
init the ProgressView use the ProgressViewStyleConfiguration
Declaration
Swift
public init?(_ configuration: ProgressViewStyleConfiguration)
Parameters
configuration
the configauration
-
Set current graphical style of the receiver.
The value of this property is a constant that specifies the style of the progress view. The default style is UIProgressView.Style.default. For more on these constants, see UIProgressView.Style.
Declaration
Swift
@discardableResult public func progressViewStyle(_ value: @autoclosure @escaping () -> UIProgressView.Style) -> ProgressView
Parameters
value
current style
Return Value
self
-
Set current progress shown by the receiver.
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.
Declaration
Swift
@discardableResult public func progress(_ value: @autoclosure @escaping () -> Float) -> ProgressView
Parameters
value
the number
Return Value
self
-
Set the color shown for the portion of the progress bar that is filled.
Declaration
Swift
@discardableResult public func progressTintColor(_ value: @autoclosure @escaping () -> UIColor?) -> ProgressView
Parameters
value
the color
Return Value
self
-
Set color shown for the portion of the progress bar that is not filled.
Declaration
Swift
@discardableResult public func trackTintColor(_ value: @autoclosure @escaping () -> UIColor?) -> ProgressView
Parameters
value
the color
Return Value
self
-
Set An image to use for the portion of the progress bar that is filled.
Declaration
Swift
@discardableResult public func progressImage(_ value: @autoclosure @escaping () -> UIImage?) -> ProgressView
Parameters
value
an image
Return Value
self
-
Set An image to use for the portion of the track that is not filled.
Declaration
Swift
@discardableResult public func trackImage(_ value: @autoclosure @escaping () -> UIImage?) -> ProgressView
Parameters
value
an image
Return Value
self
-
Adjusts the current progress shown by the receiver, optionally animating the change.
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.
Declaration
Swift
@discardableResult public func setProgress(_ value: @autoclosure @escaping () -> Float, animated: @autoclosure @escaping () -> Bool) -> ProgressView
Parameters
value
The new progress value.
animated
true if the change should be animated, false if the change should happen immediately.
Return Value
self
-
The progress object to use for updating the progress view.
When this property is set, the progress view updates its progress value automatically using information it receives from the Progress object. (Progress updates are animated.) Set the property to nil when you want to update the progress manually. The default value of this property is nil. For more information about configuring a progress object to manage progress information, see Progress.
Declaration
Swift
@available(iOS 9.0, *) @discardableResult public func observedProgress(_ value: @autoclosure @escaping () -> Progress?) -> ProgressView
Parameters
value
the new progress object
Return Value
self
-
Undocumented
Declaration
Swift
public func padding(top: ArgoValue, right: ArgoValue, bottom: ArgoValue, left: ArgoValue) -> ProgressView
-
Undocumented
Declaration
Swift
public func padding(edge: ArgoEdge, value: ArgoValue) -> ProgressView