SBProgressHUD
视图结构
SBBackgroundContainerView (Background View)
│
SBBackgroundContainerView (Bezel View)
│ ┌───────────────┐
├─┤Top Spacer View│ ┌─Activity Indicator
│ └───────────────┘ │
│ ├─Linear Progress
├──Indicator───────────┤
│ ├─Doughnut Progress
├──Title Label │
│ ├─Pie Progress
├──Details Label │
│ ├─Text Label
│ ┌──────────────────┐ │
└─┤Bottom Spacer View│ └─Custom View
└──────────────────┘
API
属性
- 委托
- 完成
- 样式
- 动画类型
- 进度
- 进度对象
- 颜色
- 背景视图颜色
- 边框视图模糊效果样式
- 标题文本
- 标题字体
- 标题文字颜色
- 标题属性文本
- 详情文本
- 详情字体
- 详情文字颜色
- 详情属性文本
- 偏移
- 边距
- 最小大小
- 内容边距
- 宽限期
- 最小显示时间*
- 停止时从视图中移除
- 启用运动效果
- 自定义视图
方法
- init()
- showProgressHUD(onView:animated:)
- hideProgressHUD(fromView:animated:)
- getProgressHUD(fromView:)
- showProgressHUD(animated:)
- hideProgressHUD(animated:)
- delayHideProgressHUD(_:animated:)
限制条件
- iOS 11.0+
- Swift 5.0+
安装
Cocoapods
pod 'SBProgressHUD-Spirit', '~> 1.0'
Swift包管理器
https://github.com/spirit-jsb/SBProgressHUD.git
作者
spirit-jsb,[email protected]
许可文件
SBProgressHUD
可在 MIT
许可下使用,更多详情请参阅许可文件