测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2017年1月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Anand V 管理。
这是一个自定义上传按钮,在上传过程中显示动画。用户可以在上传过程完成后停止动画。还有一个启用/禁用按钮的选项。
要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install
以下是使用 CustomUploadButton
的方法。
将 CustomUploadButton 导入到您的 ViewController 中,
import CustomUploadButton
然后创建 CustomUploadButton 的一个实例,并按照以下方式设置代理
@IBOutlet weak var uploadButton: CustomUploadButton!
uploadButton.delegate = self
现在,在完成您的任务后,您可以停止动画的 CustomUploadButtonActionDelegate
函数中实现
public func buttonAction(sender: CustomUploadButton) {
//Your task here
if sender == uploadButton {
sender.stopAnimation()
}
}
Anand V,[email protected]
CustomUploadButton 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。