jtm

JTMaterialSpinner

An iOS material design spinner view

Showing:

Popularity

Downloads/wk

0

GitHub Stars

129

Maintenance

Last Commit

3yrs ago

Contributors

5

Package

Dependencies

0

License

MIT

Categories

Readme

JTMaterialSpinner

CI Status Version License Platform

An iOS material design spinner view.

Installation

With CocoaPods, add this line to your Podfile.

pod 'JTMaterialSpinner', '~> 3.0'

Screenshots

Example

Usage

Basic usage

import UIKit
import JTMaterialSpinner

class ViewController: UIViewController {

    var spinnerView = JTMaterialSpinner()

    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Customize the line width
        spinnerView.circleLayer.lineWidth = 2.0

        // Change the color of the line
        spinnerView.circleLayer.strokeColor = UIColor.orange.cgColor
        
        // Change the duration of the animation
        spinnerView.animationDuration = 2.5
    }

    func loadSomething () {
        spinnerView.beginRefreshing()
        MyService.loadSomeData() { () -> () in
            spinnerView.endRefreshing()
        }
    }
}

Requirements

  • iOS 8.0 or higher
  • Swift 4.2

Author

License

JTMaterialSpinner is released under the MIT license. See the LICENSE file for more info.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100