zichunping / CircularSpinner

A Beautiful fullscreen Circular Spinner, very useful for determinate and indeterminate task. You can use it as activity indicator during loading.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircularSpinner

A Beautiful fullscreen Circular Spinner, very useful for determinate or indeterminate task. You can use it as activity indicator during loading.

Demo

Spinner demo

Installation

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

pod 'CircularSpinner'

Usage

You can present the circular spinner from anywhere by calling the show() class method.

Determinate Mode Example:

Presentation:

CircularSpinner.show(animated: true, showDismissButton: false, delegate: self)

Update the value by calling:

CircularSpinner.setValue(0.2, animated: true)

The spinner will automatically dismiss when it reaches the 100%, alternatively you can dismiss it manually by calling:

CircularSpinner.hide()

Indeterminate Mode Example:

Presentation:

CircularSpinner.show("Loading...", animated: true, type: .indeterminate)

Dismiss by calling:

CircularSpinner.hide()

Delegate

There's one method in the CircularSpinnerDelegate that you can use to customize the appearance of the percentual Label:

optional func circularSpinnerTitleForValue(value: Float) -> NSAttributedString

Author

taglia3, matteo.tagliafico@gmail.com

LinkedIn, Matteo Tagliafico

License

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

About

A Beautiful fullscreen Circular Spinner, very useful for determinate and indeterminate task. You can use it as activity indicator during loading.

License:MIT License


Languages

Language:Swift 89.1%Language:Ruby 10.9%