UIVVMaterialComponent
为 iOS Swift 的 Material Components
First import UIVVMaterialComponent
in your swift file
import UIVVMaterialComponent
and then in your viewDidLoad create it
override func viewDidLoad() {
super.viewDidLoad()
let spinner = UIVVMaterialSpinner.init()
spinner.frame = CGRect(x: 50, y: 50, width: 50, height: 50)
spinner.beginRefreshing()
self.view.addSubview(spinner)
}
需求
- Swift 5.0 或更高版
- iOS 13.0 或更高版
安装
CocoaPods
- 将
pod 'UIVVMaterialComponent', '~> 1.2.2'
添加到您的 Podfile。 - 运行
pod install
。
注意:安装 UIVVMaterialComponent 需要 CocoaPods 1.4.0。