Inherits from UIView
Declared in IGProgressView.h

Overview

The IGProgressView is a multifaceted progress control capable of rendering standard, radial, or even custom progress shapes. In addition, to the IGProgressView looking great out of the box, nearly every part IGProgressView can be styled to look great in your app. Properties such as progressTintColor and progressTrackTintColor make it simple to adjust the color of the IGProgressView. Although, if you require finer tuning; progressShapeLayer, progressTrackShapeLayer, and radialInsertShapeLayer are exposed to give you complete control over the progress appearance all the way down to the stroke used. The styling doesn’t stop at only visual appearance, the properties progressAnimationDuration and progressAnimationTimingFunction allow for polishing the animation that occurs when the progress changes value.

Tasks

Initialization and Configuration

Progress Styling

  •   progressTintColor

    The UIColor shown for the portion of the progress that is filled. Type: UIColor Default: colorWithRed:0.0 green:174/255.0 blue:239/255.0 alpha:1.0

    property
  •   progressTrackTintColor

    The UIColor shown for the portion of the progress that is not filled. Type: UIColor Default: colorWithRed:88/255.0 green:89/255.0 blue:91/255.0 alpha:1.0

    property
  •   radialContentView

    The UIView placed into the center of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress styles. Type: UIView Default: nil

    property
  •   radialInsertScale

    The size of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress style’s insert. Type: CGFloat Default: 0.80

    property
  •   radialInsertTintColor

    The UIColor shown for the insert portion of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress styles. Type: UIColor Default: whiteColor

    property
  •   radialStartAngle

    The start angle for the scale in degrees. Type: CGFloat Default: 270.0

    property
  •   radialEndAngle

    The end angle for the scale in degrees. Type: CGFloat Default: 270.0

    property
  •   standardCornerRadius

    The radius to use when drawing rounded corners for the IGProgressViewStyleStandard and IGProgressViewStyleStandardIndeterminate progress styles. Type: CGFloat Default: 8.0

    property

Progress Shape Layers

Properties

progress

The current progress shown by the IGProgressView.

@property (nonatomic, assign) CGFloat progress

Discussion

The current progress is represented by a floating-point value between 0.0 and 1.0. A value of 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.

Declared In

IGProgressView.h

progressAnimationDuration

The animation duration when animating the progress to a new value. Type: CGFloat Default: 0.25

@property (nonatomic, assign) CGFloat progressAnimationDuration

Discussion

The animation duration is measured in seconds. This property is used with the IGProgressViewStyleRadial and IGProgressViewStyleStandard progress styles.

Declared In

IGProgressView.h

progressAnimationTimingFunction

The constant used to specify one of the predefined Core Animation timing functions. Type: NSString * Default: kCAMediaTimingFunctionDefault

@property (nonatomic, assign) NSString *progressAnimationTimingFunction

Discussion

This property is used with the IGProgressViewStyleRadial and IGProgressViewStyleStandard progress styles.

Declared In

IGProgressView.h

progressShapeLayer

Returns the CAShapeLayer of the progress that is filled. (read-only)

@property (nonatomic, readonly) CAShapeLayer *progressShapeLayer

Declared In

IGProgressView.h

progressTintColor

The UIColor shown for the portion of the progress that is filled. Type: UIColor Default: colorWithRed:0.0 green:174/255.0 blue:239/255.0 alpha:1.0

@property (nonatomic, retain) UIColor *progressTintColor

Declared In

IGProgressView.h

progressTrackShapeLayer

Returns the CAShapeLayer of the progress that is not filled. (read-only)

@property (nonatomic, readonly) CAShapeLayer *progressTrackShapeLayer

Declared In

IGProgressView.h

progressTrackTintColor

The UIColor shown for the portion of the progress that is not filled. Type: UIColor Default: colorWithRed:88/255.0 green:89/255.0 blue:91/255.0 alpha:1.0

@property (nonatomic, retain) UIColor *progressTrackTintColor

Declared In

IGProgressView.h

progressViewStyle

Returns the style of the IGProgressView. (read-only)

@property (nonatomic, readonly) IGProgressViewStyle progressViewStyle

Discussion

Supported styles:

  • IGProgressViewStyleStandardIndeterminate
  • IGProgressViewStyleStandard
  • IGProgressViewStyleRadialIndeterminate
  • IGProgressViewStyleRadial
  • IGProgressViewStyleCustom

Declared In

IGProgressView.h

radialContentView

The UIView placed into the center of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress styles. Type: UIView Default: nil

@property (nonatomic, retain) UIView *radialContentView

Discussion

When the IGProgressView is drawn the UIView will be re-sized to fit within the radial’s insert.

Declared In

IGProgressView.h

radialEndAngle

The end angle for the scale in degrees. Type: CGFloat Default: 270.0

@property (nonatomic, assign) CGFloat radialEndAngle

Discussion

The angle system used starts at mathematical 0 degrees and sweeps clockwise 360 degrees. Values less than 0.0 or greater than 360.0 are wrapped.

Declared In

IGProgressView.h

radialInsertScale

The size of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress style’s insert. Type: CGFloat Default: 0.80

@property (nonatomic, assign) CGFloat radialInsertScale

Discussion

The radialInsertScale is represented by a floating-point value between 0.0 and 1.0. A value of 1.0 would completely cover the underlying radial progress. Values less than 0.0 and greater than 1.0 are pinned to those limits.

Declared In

IGProgressView.h

radialInsertShapeLayer

Returns the CAShapeLayer of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress style’s insert. (read-only)

@property (nonatomic, readonly) CAShapeLayer *radialInsertShapeLayer

Declared In

IGProgressView.h

radialInsertTintColor

The UIColor shown for the insert portion of the IGProgressViewStyleRadial and IGProgressViewStyleRadialIndeterminate progress styles. Type: UIColor Default: whiteColor

@property (nonatomic, retain) UIColor *radialInsertTintColor

Declared In

IGProgressView.h

radialStartAngle

The start angle for the scale in degrees. Type: CGFloat Default: 270.0

@property (nonatomic, assign) CGFloat radialStartAngle

Discussion

The angle system used starts at mathematical 0 degrees and sweeps clockwise 360 degrees. Values less than 0.0 or greater than 360.0 are wrapped.

Declared In

IGProgressView.h

standardCornerRadius

The radius to use when drawing rounded corners for the IGProgressViewStyleStandard and IGProgressViewStyleStandardIndeterminate progress styles. Type: CGFloat Default: 8.0

@property (nonatomic, assign) CGFloat standardCornerRadius

Declared In

IGProgressView.h

Instance Methods

initWithCustomShape:

Initializes and returns an IGProgressView object.

- (id)initWithCustomShape:(CGPathRef)customShape

Parameters

customShape

The CGPathRef to use as the custom progress shape.

Return Value

An initialized IGProgressView object or nil if the object couldn’t be created.

Discussion

The initialized IGProgressView will have a frame of CGRectZero and will need set through the frame property.

Declared In

IGProgressView.h

initWithFrame:customShape:

Initializes and returns an IGProgressView object.

- (id)initWithFrame:(CGRect)frame customShape:(CGPathRef)customShape

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

customShape

The CGPathRef to use as the custom progress shape.

Return Value

An initialized IGProgressView object or nil if the object couldn’t be created.

Declared In

IGProgressView.h

initWithFrame:viewStyle:

Initializes and returns an IGProgressView object.

- (id)initWithFrame:(CGRect)frame viewStyle:(IGProgressViewStyle)progressStyle

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

progressStyle

A IGProgressViewStyle enumeration value that specifies the style of the progress to be created.

Return Value

An initialized IGProgressView object or nil if the object couldn’t be created.

Discussion

Supported styles:

  • IGProgressViewStyleStandardIndeterminate
  • IGProgressViewStyleStandard
  • IGProgressViewStyleRadialIndeterminate
  • IGProgressViewStyleRadial

Declared In

IGProgressView.h

initWithStyle:

Initializes and returns an IGProgressView object.

- (id)initWithStyle:(IGProgressViewStyle)progressStyle

Parameters

progressStyle

A IGProgressViewStyle enumeration value that specifies the style of the progress to be created.

Return Value

An initialized IGProgressView object or nil if the object couldn’t be created.

Discussion

The initialized IGProgressView will have a frame of CGRectZero and will need set through the frame property.

Supported styles:

  • IGProgressViewStyleStandardIndeterminate
  • IGProgressViewStyleStandard
  • IGProgressViewStyleRadialIndeterminate
  • IGProgressViewStyleRadial

Declared In

IGProgressView.h

setProgress:animated:

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

- (void)setProgress:(CGFloat)progress animated:(BOOL)animated

Parameters

progress

The new progress value.

animated

YES if the change should be animated, NO if the change should happen immediately.

Discussion

The current progress is represented by a floating-point value between 0.0 and 1.0. A value of 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.

Declared In

IGProgressView.h