PUGifLoading
示例
要运行示例项目,克隆仓库,然后首先从Example目录运行pod install
示例项目输出
需求
安装
PUGifLoading可通过CocoaPods获取。安装时,只需将以下行添加到您的Podfile中:
pod 'PUGifLoading'
使用版本规范
pod 'PUGifLoading', :git => 'https://github.com/PayalUmraliya/PUGifLoaderControl.git', :branch => '1.0.2'
用法
显示加载器
导入控件
import PUGifLoading
为该控件创建一个对象
let loading = PUGIFLoading()
你可以使用下面的方法(GIF 或活动指示器)显示不确定任务的进度状态。
GIF加载器视图 - 你可以根据需要使用任何GIF图像。
loading.show("Loading", gifimagename: "foodloader")
-
上述函数接受2个参数
- 1 - 要显示的文本
- 2 - 在加载器中显示的GIF图像的名称
活动指示器加载器视图
loading.showWithActivityIndicator("Loading", activitycolor: UIColor.yellow, labelfontcolor:UIColor.yellow , labelfontsize: 16.0,activityStyle: UIActivityIndicatorViewStyle.whiteLarge)
-
上述函数接受5个参数
- 1 - 要显示的文本
- 2 - activitycolor - 指示器颜色
- 3 - labelfontcolor - 标签颜色
- 4 - labelfontsize - 要显示文本的字体大小
- 5 - activityStyle - activityIndicatorViewStyle 指示器样式
隐藏加载器
loading.hide()
许可
MIT许可(MIT)
版权所有 (c) 2021 TheKarma
作者
Payal Umraliya [[email protected]]
fits fits fits fits fits fits fits