测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可 | MIT |
发布上次发布 | 2017年9月 |
SwiftSwift版本 | 3.0 |
SPM支持SPM | ✗ |
由Kirill Averyanov维护。
创建美观的动画占位符以显示数据加载。您可以根据需要更改颜色。
在使用任何视图添加动画灰色加载符时
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)
关于更多用法,请查看“示例”
要将KALoader集成到项目中
Podfile
并运行pod install
pod 'KALoader'
carthage update
github "kirillzzy/KALoader"
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.