【问题标题】:MBProgressHUD added to navigationController.view without disabling userInteractionMBProgressHUD 添加到 navigationController.view 而不禁用 userInteraction
【发布时间】:2016-03-02 18:50:40
【问题描述】:

我必须将我的 MBProgressHUD 添加到 self.navigationController.view,因为在 self.view 上存在设计错误(在 UITableView 中)。

一切都按预期工作,但 MBProgressHud 禁用了后退按钮上的 userInteraction(左 navigationItem),我希望这不会禁用它。

我该怎么做?

这是我将 hud 添加到 self.view 时的屏幕截图:

【问题讨论】:

  • 你有没有尝试改变 hud 框架?
  • @TejaNandamuri 当我添加到 self.view 时?不,你是什么意思?我正在使用:self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; self.hud.mode = MBProgressHUDModeIndeterminate;
  • @TejaNandamuri 试图改变框架,不起作用...
  • 你是怎么改的?
  • @TejaNandamuri 尝试使用 self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; self.hud.frame = CGRectMake(200, 200, 50, 50);

标签: ios objective-c uitableview uinavigationcontroller mbprogresshud


【解决方案1】:

您可以将 UITableViewController 嵌入到 ContainerView 中,然后在 Container 上显示 HUD。

【讨论】:

    【解决方案2】:

    不错的解决方法,添加:

    self.hud.layer.zPosition = 2;
    self.tableView.layer.zPosition = 1;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-14
      • 1970-01-01
      • 2021-05-07
      • 1970-01-01
      • 2015-09-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多