Code Monkey home page Code Monkey logo

hkcircularprogressview's Introduction

HKCircularProgressView

Screenshot

HKCircularProgressView is a simple discrete/continuous circular progress view with current/max properties, customizable appearance and animatable.

How to use it

  1. Use CocoaPods by adding pod 'HKCircularProgressView' in your Podfile.
  2. Manually:
  • Clone this repository
  • Copy HKCircularProgressView and HKCircularProgressLayer files (.h and .m) into your project.
  • #import "HKCircularProgressView" and add the view as a subview (you can also do this from a .xib file).

How to configure it

The main properties are:

  • Max: the maximum value.
  • Current: the current value (the progress will be current/max).
  • Step: if 0 then it will be a continuous progress view. If not, it will be a discrete progress view with (max/step) markers.

You can also configure the appearance of the view (also accessible through [HKCircularProgressView appearance]):

  • progressTintColor: the color of the progression.
  • trackTintColor: the color of the track (which is the part that is not yet completed).
  • animationDuration: the duration of the animations.
  • fillRadius: the amount of the circle that is filled. 1 draws a full circle, 0.5 draws half a circle (a ring), 0.25 a quarter, etc.
  • startAngle: the angle, in radius, where the progression begins.
  • drawFullTrack: indicates whether the track is fully drawn or not. YES will always draw a full circle of 'trackColor' color.
  • outlineWidth: if 0 (by default), does nothing. If > 0 draws outlines for non-completed progress parts.
  • outlineColor: color of the outlines, set to progressTintColor by default.
  • endPoint: specifies how the progress' end-points (start and end) will be drawn. Default is flat ( HKCircularProgressEndPointFlat ) but the project contains 2 other built-in end-points: HKCircularProgressEndPointRound and HKCircularProgressEndPointSpike. The screenshot above shows all those 3 examples. You can create your own end-point by using the HKCircularProgressEndPointDrawer protocol.

If you want to use a HKCircularProgressView as a substitute for UIActivityIndicator, you can use the following methods to start/stop an animation that rotates the view clockwise:

  • startAnimating.
  • stopAnimating.

hkcircularprogressview's People

Contributors

diegoalfarov avatar harmek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hkcircularprogressview's Issues

maybe an issue

Hello,
First of all I want to thank you for your excellent tool.
I am using it to show % of current progress but I have a problem.
When I go back to previous controller and then again in front controller containing the tool all values are double...if i do it again...triple and so on....it is like going back do not deallocate the progress tool
I am using it programmatically and not in IB so my properties of progress is strong and not weak.
Can you help me?
Thanks again
George Gerardis

Different Start and End Point Styles

I would like to start with a flat end and finished with a spiked end. Is there any way to easily do this, or would you consider it as an enhancement?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.