Skip to content

Light, well-designed, easy to use progress circle for iOS apps

License

Notifications You must be signed in to change notification settings

soucolline/ZProgressCircle

Repository files navigation

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.

About

Light, well-designed, easy to use progress circle for iOS apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published