Skip to content

kaunamohammed/KDCircularActivityIndicator

Repository files navigation

KDCircularActivityIndicator

Version License Platform

Installation

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

pod 'KDCircularActivityIndicator'

Usage

You can easily customize the animation with the following self-descriptive properties:

  • lineWidth: This property controls the width of the circular stroke path
  • strokeStartDuration: Duration for stroke start animation
  • strokeEndDuration: Duration for stroke end animation
  • spinDuration: Rotating duration for 2pi
  • shouldAutoReverseAnimation: Indicates whether the animation should be reversed
  • lineDash: The pattern used to draw the line
  • colors: The colors to add to the indicator

Initialize the indicator like this or any other way you want

lazy var activityIndicator: KDCircularActivityIndicator = {
        let indicator = KDCircularActivityIndicator()
        indicator.colors = [.red, .blue]
        indicator.translatesAutoresizingMaskIntoConstraints = false
        return indicator
    }()

Call startAnimating() to you know what

activityIndicator.startAnimating()

Call stopAnimating() to you also know what

activityIndicator.stopAnimating()

Author

This framework was written by Kauna Mohammed.

Inspiration

KDCircularActivityIndicator was inspired by an Objective-C framework - DTCircularActivityIndicator.

The API of KDCircularActivityIndicator has been designed to be as close as possible to DTCircularActivityIndicator for consistency and it's also designed with a swifty feeling ✌🏿. Check out DTCircularActivityIndicator if you want a framework with the same functionality in Objective-C.

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published