我正在尝试在 Swift 中运行 MBProgressHUD。我发现我能够运行一个与 UIAlert 微调器非常相似的微调器,但我在使用其他功能时遇到了问题。根据 MBProgress 文档,您还可以使用确定的加载程序以及其他功能,包括可以成功加载的 CustomView。我想弄清楚如何在 Swift 中加载和访问这些其他函数。
这是不确定微调器的当前代码(我可以使用的唯一函数):
let loadingNotification = MBProgressHUD.showHUDAddedTo(self.view, animated: true)
loadingNotification.mode = MBProgressHUDMode.Indeterminate
loadingNotification.labelText = "Loading"
关闭 ProgressHUD:
MBProgressHUD.hideAllHUDsForView(self.view, animated: true)
请原谅这么简单的问题。我是编程的新手。非常感谢您的帮助!
最佳答案
我认为一个月后,你已经解决了它,但如果没有,我认为这对你有用:
loadingNotification.hide(true)
或延迟:
loadingNotification.hide(true, afterDelay: 3)
希望对您有所帮助! :)
关于ios - 你如何在 Swift 中使用 MBProgressHUD CustomView/Determinate Loader?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30066207/