MDRadialProgress 0.1

Posted by Marco Dinacci on 0 comments

I've been using (and still do !) several controls from cocoacontrols.com and from CocoaPods. It's great to see so many high quality components freely available, I can't calculate how many hours I've saved by using them.

I'm happy to finally contribute to these projects by releasing a simple custom UIView that can be used to represent progress in discrete steps. The inspiration comes from lumosity, whose iOS app uses a very similar component to represent the steps done in a game session. I'm quite convinced though not 100% sure that they're using an image instead of a customisable component.

The github project comes with an example (see ViewController.m) and documentation. You can install it by copying the MDRadialProgressView.{m|h} into your project or by using Cocoapod by adding this line pod 'MDRadialProgress', '~> 0.1.1' to your project's Podfile.


The simplest way to use it is to leave all properties with their default value and just customise progressTotal and progressCompleted:

// Create an instance of the view with a width and height (and consequently a diameter) of 50px. 
CGRect frame = CGRectMake(30, 30, 50, 50);
MDRadialProgressView *radialView = [[MDRadialProgressView alloc] initWithFrame:frame];

// Total number of steps    
radialView.progressTotal = 5;
// Number of steps completed
radialView.progressCurrent = 2;

// Customise colours and thickness here...see documentation on github

// Add to existing view
[self.view addSubview:radialView];

It's released under the MIT license, source code and documentation are on github.

Enjoy and let me know if you find it useful.

Marco