测试已测试 | ✗ |
Lang语言 | SwiftSwift |
许可 | MIT |
发布最后发布 | 2016 年 9 月 |
SPM支持 SPM | ✗ |
由 Manish Reddy 维护。
可以显示活动指示器而不是文本的标签和按钮,以表示请求正在处理。
添加一个标签或按钮,并将其类声明为 For Button: ButtonActivitySpinner For Label: LabelActivitySpinner 和 Module: ButtonAndLabelActivitySpinner
然后在代码中,在请求处理期间,使用以下内容以按钮或标签的中心开始活动指示器:
#!
Button.startAnimating()
Label.startAnimating()
to start the activity indicator in the center of button of label.
要停止动画,使用以下内容停止活动指示器的动画:
#!
Button.stopanimating
Label.stopanimating
to stop the activity indicator from animating.
您还可以通过以下方式更改活动指示器的颜色:
#!
Button.activityIndicator.color = UIColor.blueColor()
Cocoa Pods 是 Cocoa 项目的依赖项管理器。您可以使用以下命令安装它
#!
$ gem install cocoa pods
要将 ButtonAndLableActivitySpinner 集成到使用 CocoaPods 的 Xcode 项目中,请将以下内容指定在您的 Podfile 中
#!
source 'https://[email protected]/reddymk/buttonandlabelactivityspinner.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ButtonAndLabelActivitySpinner', '~> 1.0'
end
运行以下命令
#!
$ pod install