Inherits from UIView
Declared in SEssentialsProgressIndicator.h
Availability
Related samples IndicatorsGettingStarted
IndicatorsHowToCustomElements
IndicatorsHowToCustomStyling

Overview

SEssentialsProgressIndicator is used to display the progress of a long running task.

The SEssentialsProgressIndicator holds the current progress of the indicator. Progress can range between 0, indicating no progress, and 1, indicating that a task is complete.

To create a progress indicator, you use one of the factory methods provided. For example:

SEssentialsProgressIndicator *progressIndicator = [SEssentialsProgressIndicator progressIndicatorOfType:SEssentialsIndicatorTypeLinearContinuous
    withFrame:CGRectMake(0, 0, 200, 200)];

This returns a progress indicator which you can use in your code. When creating an indicator, you specify the type of indicator you would like. The following types are available:

  • SEssentialsIndicatorTypeLinearContinuous: A continuous horizontal progress bar
  • SEssentialsIndicatorTypeLinearDiscrete: A horizontal progress bar, made up of a set of discrete elements
  • SEssentialsIndicatorTypeRadialContinuous: A continuous radial progress bar
  • SEssentialsIndicatorTypeRadialDiscrete: A radial progress bar, made up of a set of discrete elements

When you set the progress of a progress indicator, it will redraw to show the new status.

For discrete progress indicators, you can set the number of elements in the indicator using the numberOfElements property. If you wish to use a custom factory to provide the progress indicator with elements, you can override the default by setting the elementFactory property.

The SEssentialsProgressIndicator has a style object, which is an instance of SEssentialsProgressIndicatorStyle. This manages the look and feel of the control by setting things like the color of the progress indicator. The style object should always be used to update the look and feel of the control, rather than accessing the progress indicator and setting its properties directly.

The style has precedence over any visual changes which are made to the progress indicator directly. For example, if you were to set a property such as the tint color on the progress indicator itself this change would be overridden the next time the style is updated. That is why it is important to use the style to manage the look and feel of the control.

Tasks

Other Methods

  •   progress

    The current progress of the indicator. Progress can range between 0 and 1. Because this updates the UI it should always be set on the main thread.

    property
  •   style

    The styling which will be applied to the progress bar.

    property

Discrete Indicator Properties

Factory Methods

Properties

elementFactory

A factory which provides individual elements to be drawn in the progress indicator. This is only relevant to discrete progress bars.

@property (nonatomic, assign) id<SEssentialsDiscreteIndicatorElementFactory> elementFactory

Discussion

Note: When you set the element factory on a progress indicator, this causes the indicator to redraw. For this reason, it is important to set the number of elements on your indicator before setting the factory, if your factory will only display a certain number of elements correctly.

Declared In

SEssentialsProgressIndicator.h

progress

The current progress of the indicator. Progress can range between 0 and 1. Because this updates the UI it should always be set on the main thread.

@property (nonatomic, assign) CGFloat progress

Declared In

SEssentialsProgressIndicator.h

style

The styling which will be applied to the progress bar.

@property (nonatomic, readonly, retain) SEssentialsProgressIndicatorStyle *style

Declared In

SEssentialsProgressIndicator.h

Class Methods

progressIndicatorOfType:withFrame:

Creates a progress indicator.

+ (SEssentialsProgressIndicator *)progressIndicatorOfType:(SEssentialsIndicatorType)indicatorType withFrame:(CGRect)frame

Parameters

indicatorType

The type of indicator you would like. The following types are available:

  • SEssentialsIndicatorTypeLinearContinuous: A continuous horizontal progress bar
  • SEssentialsIndicatorTypeLinearDiscrete: A horizontal progress bar, made up of a set of discrete elements
  • SEssentialsIndicatorTypeRadialContinuous: A continuous radial progress bar
  • SEssentialsIndicatorTypeRadialDiscrete: A radial progress bar, made up of a set of discrete elements
frame

The frame rectangle for the indicator, measured in points.

Return Value

An initialized progress indicator.

Declared In

SEssentialsProgressIndicator.h

progressIndicatorOfType:withFrame:style:

Creates a progress indicator.

+ (SEssentialsProgressIndicator *)progressIndicatorOfType:(SEssentialsIndicatorType)indicatorType withFrame:(CGRect)frame style:(SEssentialsProgressIndicatorStyle *)style

Parameters

indicatorType

The type of indicator you would like. The following types are available:

  • SEssentialsIndicatorTypeLinearContinuous: A continuous horizontal progress bar
  • SEssentialsIndicatorTypeLinearDiscrete: A horizontal progress bar, made up of a set of discrete elements
  • SEssentialsIndicatorTypeRadialContinuous: A continuous radial progress bar
  • SEssentialsIndicatorTypeRadialDiscrete: A radial progress bar, made up of a set of discrete elements
frame

The frame rectangle for the indicator, measured in points.

style

The style to use for this progress indicator.

Return Value

An initialized progress indicator.

Declared In

SEssentialsProgressIndicator.h

Instance Methods

applyTheme:

Applies the specified theme to the progress indicator.

- (void)applyTheme:(SEssentialsTheme *)theme

Declared In

SEssentialsProgressIndicator.h