NSProgressIndicator

The NSProgressIndicator class lets an application display a progress indicator to show that a lengthy task is under way. Some progress indicators are indeterminate and do nothing more than spin to show that the application is busy. Others are determinate and show the percentage of the task that has been completed.

Deprecation Statement

Declaration

Parameters

delay

The number of seconds between animation steps. By default, the animation delay is set to 1/12 of a second (5.0/60.0). Setting the delay to a double value larger than 5.0/60.0 slows the animation, while setting the delay to a smaller value speeds it up. A determinate progress indicator does not use the animation delay value.

Declaration

Return Value

The value representing the current extent of a determinate progress bar. For example, a determinate progress indicator goes from 0.0 to 100.0 by default. If the progress bar has advanced halfway across the view, the value returned by doubleValue would be 50.0. An indeterminate progress indicator does not use this value.

See Also

Declaration

Return Value

The minimum value of the progress indicator. By default, a determinate progress indicator goes from 0.0 to 100.0, so the value returned would be 0.0. An indeterminate progress indicator does not use this value.

See Also

Declaration

Return Value

The maximum value of the progress indicator. By default, a determinate progress indicator goes from 0.0 to 100.0, so the value returned would be 100.0. An indeterminate progress indicator does not use this value.

Import Statement

Availability

See Also

Declaration

Swift

var indeterminate: Bool

Objective-C

@property(getter=isIndeterminate) BOOL indeterminate

Parameters

flag

YEStrue if the progress indicator should be indeterminate; otherwise NOfalse.

Discussion

This method only has an effect if style returns NSProgressIndicatorBarStyle. If style returns NSProgressIndicatorSpinningStyle, the indicator is always indeterminate, regardless of what you pass to this method.

Import Statement

Availability

Declaration

Swift

var displayedWhenStopped: Bool

Objective-C

@property(getter=isDisplayedWhenStopped) BOOL displayedWhenStopped

Parameters

isDisplayed

YEStrue to hide the progress indicator when it isn't animating; otherwise NOfalse. By default, this is YEStrue if style is NSProgressIndicatorBarStyle, and NOfalse if style is NSProgressIndicatorSpinningStyle.

Import Statement

Availability

See Also

Returns a Boolean value indicating whether the receiver shows itself even when it’s not animating.

Declaration

Objective-C

- (BOOL)isDisplayedWhenStopped

Return Value

YEStrue if the progress indicator shows itself even when it’s not animating. By default, this returns returns YEStrue if style is NSProgressIndicatorBarStyle and NOfalse if style isNSProgressIndicatorSpinningStyle.