Skip to content

A custom circle progress bar with pulse animation.

License

Notifications You must be signed in to change notification settings

carabina/VVCircleProgressBar

Repository files navigation

VVCircleProgressBar

Swift 4 Twitter: @vinothvino42

Custom animating circle progress bar.

Preview

VVCircleProgressBar1 VVCircleProgressBar2

Installation

You can install this circle progress bar in two ways.

1. CocoaPods

VVCircleProgressBar is available through Cocoapods. To install it, simply add the following line to your Podfile.

pod 'VVCircleProgressBar'

2. Manually

Download and copy VVCircleProgressBar/VVCircleProgressBar.swift file to your project.

Usage

VVCircleProgressBar can be instantiated programmatically.

let progressBar = VVCircleProgressBar()
progressBar.center = self.view.center
self.view.addSubview(progressBar)

Customize

You can customize the progress bar color, text font and text color

  • Progress Text
progressBar.textColor = UIColor.white
progressBar.font = UIFont(name: "HelveticaNeue-Bold", size: 24)!
  • Progress Bar Color
progressBar.pulsingColor = UIColor.pulsatingFillColor
progressBar.progressColor = UIColor.outlineStrokeColor
progressBar.trackingStrokeColor = UIColor.trackStrokeColor
progressBar.trackingFillColor = UIColor.backgroundColor
  • Size of Progress Bar
progressBar.progressLayerWidth = 20
progressBar.trackLayerWidth = 20
progressBar.pulseLayerWidth = 1.3

To start pulse animation

progressBar.startPulsingAnimation()

To stop pulse animation

progressBar.stopPulsingAnimation()

License

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

Author

About

A custom circle progress bar with pulse animation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published