Skip to content
Circular Progress Control using CAShapeLayer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CircularProgressControl.xcodeproj
CircularProgressControl
CircularProgressControlTests
LICENSE
README.md

README.md

CircularProgressControl


This is a simple and adaptive Circular Progress View.

It basically consists of two CAShapeLayers to draw a static and a animated circle, and a progress label with two lines, the first to describe a timer and the second for a state.

Screenshot

Features

  • automatically update the circle progress when the elapsed time is set
  • autolayout compatible
  • autoformat the timer label
  • tint color of progress layer and label
  • state description can be changed

Installation

Grab the files in View/CircularProgressView and put it in your project. The code uses ARC, so make sure to turn that on for the files if you're not already using ARC.

Usage

Subclass CircularProgressView or manually create a new instance using alloc/initWithFrame:

CircleProgressView *progressView = [[CircleProgressView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];

Configure the parameters before set the elapsed time:

[_circleProgressView setTimeLimit:3600*8];
[_circleProgressView setStatus:NSLocalizedString(@"circle-progress-view.status-not-started", nil)];
[_circleProgressView setTintColor:[UIColor whiteColor]];
[_circleProgressView setElapsedTime:0];

Small Print

License

CircularProgressView is released under the MIT license.

Author

Carlos Arantes (@carantes)

Bitdeli Badge

You can’t perform that action at this time.