KALoader 0.3

KALoader 0.3

测试已测试
语言语言 SwiftSwift
许可 MIT
发布上次发布2017年9月
SwiftSwift版本3.0
SPM支持SPM

Kirill Averyanov维护。



  • Kirill

KALoader

创建美观的动画占位符以显示数据加载。您可以根据需要更改颜色。

alt tag alt tag alt tag

用法

在使用任何视图添加动画灰色加载符时

view.showLoader()

隐藏动画加载符

view.hideLoader()

您可以询问加载符是否正在显示

if view.isLoaderShowing() {
  view.hideLoader()
}

您可以以自定义颜色和动画持续时间的加载符显示

 let backColorRed = UIColor(red: 255.0 / 255, green: 75.0 / 255, blue: 97.0 / 255, alpha: 1.0)
 let firstLoadColorRed = UIColor(red: 239.0 / 255, green: 64.0 / 255, blue: 85.0 / 255, alpha: 1.0)
 let secondLoadColorRed = UIColor(red: 225.0 / 255, green: 54.0 / 255, blue: 75.0 / 255, alpha: 1.0)
 let colorsRed = [backColorRed, firstLoadColorRed, secondLoadColorRed, firstLoadColorRed, backColorRed]
 view.showLoader(colors: colorsRed, animationDuration: 1.5)

‼️“colors”数组应只获取5种不同的颜色

关于更多用法,请查看“示例”

安装

要将KALoader集成到项目中

  • 将以下内容添加到您的Podfile并运行pod install
pod 'KALoader'
  • 或者将以下内容添加到Cartfile并运行carthage update
github "kirillzzy/KALoader"
  • 或者作为git子模块克隆

作者

Kirill Averyanov

许可

MIT License

Copyright (c) 2017 Kirill Averyanov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.