Class

UIProgressView

You use the UIProgressView class to depict the progress of a task over time. An example of a progress bar is the one shown at the bottom of the Mail application when it’s downloading messages.

Overview

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.

For more information about appearance and behavior configuration, see Progress Views.

Symbols

Initializing the UIProgressView Object

init(progressViewStyle: UIProgressViewStyle)

Initializes and returns an progress-view object.

Managing the Progress Bar

var progress: Float

The current progress shown by the receiver.

func setProgress(Float, animated: Bool)

Adjusts the current progress shown by the receiver, optionally animating the change.

var observedProgress: Progress?

The progress object to use for updating the progress view.

Configuring the Progress Bar

var progressViewStyle: UIProgressViewStyle

The current graphical style of the receiver.

var progressTintColor: UIColor?

The color shown for the portion of the progress bar that is filled.

var progressImage: UIImage?

An image to use for the portion of the progress bar that is filled.

var trackTintColor: UIColor?

The color shown for the portion of the progress bar that is not filled.

var trackImage: UIImage?

An image to use for the portion of the track that is not filled.

Constants

UIProgressViewStyle

The styles permitted for the progress bar.