MBProgressHud - 仅在一个选项卡中操作?
有没有办法让 MBProgressHud 仅在一个选项卡中处于活动状态?目前,由于它在最高视图中运行,选项卡和 UI 的其余部分没有响应。
Is there any way to make MBProgressHud only active in one tab? Currently, as it runs in the highest view the tabs and rest of the UI are unresponsive.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,有 - 只需将其添加到该选项卡的根视图控制器即可。
通常,这是一个导航控制器,因此您可以这样做:
[self.navigationController.view addSubview:self.myProgressHUD];
或者,如果您没有使用导航控制器,请将其直接添加到视图中视图控制器显示在选项卡中。
Yes, there is - just add it to the root view controller of that tab.
Typically, that's a navigation controller, so you might do this:
[self.navigationController.view addSubview:self.myProgressHUD];
Or if you weren't using a navigation controller, add it directly to the view of your view controller being displayed in your tab.
当我加载 MBProgressHUD 时,我通常只是在 self.view 上调用它,它仍然允许我在运行时切换选项卡。
When I load MBProgressHUD, I generally just call it on self.view and it still allows me to switch tabs while it is running.