在视图中隐藏标签栏有推迟有轻微延迟

时间:2017-09-13 01:53:14

标签: ios swift autolayout storyboard uitabbar

我正在尝试从下面有tabBar的viewcontroller推送到UserProfileViewController期间隐藏标签栏。

代码:

func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  guard let toVC = UIStoryboard(name:"UserProfile", bundle:nil).instantiateViewController(withIdentifier: "userProfileVC") as? ProfileViewController else { return }

  ...

  toVC.hidesBottomBarWhenPushed = true
  self.navigationController?.pushViewController(toVC, animated: true)
}

所以代码工作正常,它确实隐藏了推送时的底栏。然而,在推动之后,它给了我一点延迟,并在下面显示一个空白的空白区域,因为隐藏的标签栏就像一两秒钟。我想在推动时摆脱底部的白色空间。请帮忙。

我已经尝试过了:

  • 在故事板中勾选Hide Bottom Bar On Push
  • 在故事板中勾选Under Opaque Bars On Push

布局&在故事板中勾选的扩展边缘选项:

  • 调整滚动视图插图
  • 隐藏推杆底栏
  • 在顶栏下
  • 在底栏下
  • 在不透明的酒吧

0 个答案:

没有答案