【发布时间】:2019-03-14 12:26:11
【问题描述】:
我正在使用 MBProgressHUD 并希望将 bezelView 设置为 br 透明。
import UIKit
import MBProgressHUD
class ProgressBarManager {
func showProgressBar() {
guard let testView = UIApplication.shared.windows.last else { return }
let hud = MBProgressHUD.showAdded(to: testView, animated: true)
hud.bezelView.layer.cornerRadius = 5
hud.bezelView.backgroundColor = .clear
hud.backgroundView.style = .solidColor
hud.backgroundView.color = UIColor(white: 0, alpha: 0.3)
}
}
但是 bezelView 仍然显示:
有办法隐藏吗?
【问题讨论】:
-
你试过 hud.backgroundView.color = UIColor.clear 吗?
-
@RajeshKumarR 是的,这使得整个背景变得清晰,而不是像上面那样暗一点
标签: ios swift uiactivityindicatorview mbprogresshud