ZProgressCircle 1.0.0

ZProgressCircle 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Thomas Guilleminot.



ZProgressCircle

CI Status
Version
License
Platform

ZProgressCircle is a simple, out of the box Swift component that represents a circle that fills up

Installation

ZProgressCircle is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ZProgressCircle'

How to use

  • Drag a UIView in your storyboard

  • Give the view a custom class of type ZProgressCircle

    Progress circle custom class

  • The progress circle should now appear on your storyboard as follows

    Default progress circle

  • You can now customise it through the @IBInspectable variables available :

    @IBInscpectable variables

Customisation

The available customisations are the following :

  • Total count : the total amount required to fill the circle
  • Completion count : the actual amount
  • Percent complete : a percentage of completion (same as completion count but in percentage)
  • Completion color : the color of the circle when completed
  • Original color : the color of the circle when at 0
  • Filling color : the collor of the filling part of the circle

You also have access to isCompleted boolean attribute to check if the circle is completed or not

Availables methods :

  • increment() : add step to the circle
  • setCompletion(to value: Int) : set the circle to the desired value. If the value is > the total count required then the circle is set to completed

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Zlatan, [email protected]

License

ZProgressCircle is available under the MIT license. See the LICENSE file for more info.