JTMaterialSpinner 3.0.5

JTMaterialSpinner 3.0.5

测试已测试
语言语言 SwiftSwift
许可 MIT
发布上次发布2019年1月
SPM支持 SPM

Jonathan Vukovich Tribouharet 维护。




  • 作者:
  • Jonathan VUKOVICH TRIBOUHARET

JTMaterialSpinner

CI Status Version License Platform

iOS 物料设计旋转视图。

安装

使用 CocoaPods,将此行代码添加到您的 Podfile 中。

pod 'JTMaterialSpinner', '~> 3.0'

屏幕截图

Example

使用方法

基本用法

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()
        }
    }
}

需求

  • iOS 8.0 或更高版本
  • Swift 4.2

作者

许可

JTMaterialSpinner 采用 MIT 许可发布。有关更多信息,请参阅 LICENSE 文件。