Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnvuko/jtmaterialspinner
An iOS material design spinner view
https://github.com/johnvuko/jtmaterialspinner
ios ios-animation loader material material-design spinner swift
Last synced: 3 months ago
JSON representation
An iOS material design spinner view
- Host: GitHub
- URL: https://github.com/johnvuko/jtmaterialspinner
- Owner: johnvuko
- License: mit
- Created: 2015-07-31T23:14:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-11-15T20:08:27.000Z (about 3 years ago)
- Last Synced: 2024-07-22T10:48:16.719Z (6 months ago)
- Topics: ios, ios-animation, loader, material, material-design, spinner, swift
- Language: Swift
- Homepage:
- Size: 181 KB
- Stars: 129
- Watchers: 8
- Forks: 21
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JTMaterialSpinner
[![CI Status](http://img.shields.io/travis/jonathantribouharet/JTMaterialSpinner.svg)](https://travis-ci.org/jonathantribouharet/JTMaterialSpinner)
![Version](https://img.shields.io/cocoapods/v/JTMaterialSpinner.svg)
![License](https://img.shields.io/cocoapods/l/JTMaterialSpinner.svg)
![Platform](https://img.shields.io/cocoapods/p/JTMaterialSpinner.svg)An iOS material design spinner view.
## Installation
With [CocoaPods](http://cocoapods.org/), add this line to your Podfile.
pod 'JTMaterialSpinner', '~> 3.0'
## Screenshots
![Example](./Screens/example.gif "Example View")
## Usage
### Basic usage
```swift
import UIKit
import JTMaterialSpinnerclass 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
- [Jonathan VUKOVICH TRIBOUHARET](https://github.com/jonathantribouharet) ([@johnvuko](https://twitter.com/johnvuko))
## License
JTMaterialSpinner is released under the MIT license. See the LICENSE file for more info.