介绍
KVLoading
是一个加载界面,您可以自定义。使用非常简单,只需添加类并写几个代码行。
示例
默认 | 自定义 |
---|---|
![]() |
![]() |
需求
- iOS 10.0+
- Swift 5.0
安装
KVLoading 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile
pod 'KVLoading', '~> 2.0.3'
用法
显示默认加载
KVLoading.shared.show()
显示默认加载(不带动画)
KVLoading.shared.show(animated: false)
显示自定义视图加载
let customView: UIView = UIView()
KVLoading.shared.show(customView)
显示自定义视图加载(不带动画)
let customView: UIView = UIView()
KVLoading.shared.show(customView, animated: false)
隐藏加载视图
KVLoading.shared.hide()
隐藏加载视图(不带动画)
KVLoading.shared.hide(animated: false)
作者
胡万辖, [email protected]
我的Facebook: https://#/vuvankhac.official
我的Twitter: https://twitter.com/vuvankhac
许可证
KVLoading可在MIT许可证下获得。有关更多信息,请参阅LICENSE文件。