MDCProgressView

@interface MDCProgressView : UIView

A Material linear determinate progress view.

See https://material.io/go/design-progress-indicators

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

    The default is a blue color. When changed, the trackTintColor is reset.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable)
        UIColor *progressTintColor;
  • The color shown for the portion of the progress view that is not filled.

    The default is a light version of the current progressTintColor.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable)
        UIColor *trackTintColor;
  • The current progress.

    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. To animate progress changes, use -setProgress:animated:completion:.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) float progress;
  • The backward progress animation mode.

    When animating progress which is lower than the current progress value, this mode will determine which animation to use. The default is MDCProgressViewBackwardAnimationModeReset.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        MDCProgressViewBackwardAnimationMode backwardProgressAnimationMode;
  • Adjusts the current progress, optionally animating the change.

    Declaration

    Objective-C

    - (void)setProgress:(float)progress
               animated:(BOOL)animated
             completion:(void (^_Nullable)(BOOL))completion;

    Parameters

    progress

    The progress to set.

    animated

    Whether the change should be animated.

    completion

    The completion block executed at the end of the animation.

  • Changes the hidden state, optionally animating the change.

    Declaration

    Objective-C

    - (void)setHidden:(BOOL)hidden
             animated:(BOOL)animated
           completion:(void (^_Nullable)(BOOL))completion;

    Parameters

    hidden

    The hidden state to set.

    animated

    Whether the change should be animated.

    completion

    The completion block executed at the end of the animation.