MKProgress 1.1.0

MKProgress 1.1.0

测试已测试
语言 SwiftSwift
许可证 MIT
发布上次发布2019年6月
SPM支持 SPM

Muhammad Kamran 维护。




  • Muhammad Kamran

MKProgress

一个 iOS 简单 Swift 进度 HUD

image image image image image

要求

  • iOS 9.0+
  • Swift 3.0+
  • Xcode 8.0+

安装

MKProgress 只可通过 CocoaPods 获取。

pod 'MKProgress', '~> 1.1.0'

如果想要使用 MKProgress 的最新功能,请使用正常的源依赖项。

pod 'MKProgress', :git => 'https://github.com/kamirana4/MKProgress.git'

这会在您每次执行 'pod install' 时拉取最新的 master 分支。

对于 Xcode 9.4.1 或 Swift < 4.2

  pod 'MKProgress', '1.0.7'

用法

包含的示例代码展示了如何使用Progress HUD。

导入 MKProgress

import MKProgress

显示进度HUD

MKProgress.show()

延时显示进度HUD

MKProgress.show(after: 0.1, animated: true)

隐藏进度HUD

MKProgress.hide()

自定义

MKProgress可以通过以下配置进行自定义

MKProgress.config.hudType = .radial
MKProgress.config.width = 64.0
MKProgress.config.height = 64.0
MKProgress.config.hudColor = .white
MKProgress.config.backgroundColor = UIColor(white: 0, alpha: 0.55)
MKProgress.config.cornerRadius = 16.0
MKProgress.config.fadeInAnimationDuration = 0.2
MKProgress.config.fadeOutAnimationDuration = 0.25
MKProgress.config.hudYOffset = 15

MKProgress.config.circleRadius = 40.0
MKProgress.config.circleBorderWidth = 1.0
MKProgress.config.circleBorderColor = .darkGray
MKProgress.config.circleAnimationDuration = 0.9
MKProgress.config.circleArcPercentage = 0.85
MKProgress.config.logoImage: UIImage?  = nil
MKProgress.config.logoImageSize = CGSize(width: 40, height: 40)

MKProgress.config.activityIndicatorStyle = .whiteLarge
MKProgress.config.activityIndicatorColor = .black
MKProgress.config.preferredStatusBarStyle = .lightContent
MKProgress.config.prefersStatusBarHidden = false

许可

MKProgress遵循MIT许可证发布。请参阅LICENSE或Detali获取详细信息