更新时间:2023-10-08 23:35:40
topBar是UINavigationController的一部分,而不是UITabBarController的一部分,您可以通过将以下内容放在viewWillAppear方法中来隐藏它:
The topBar is part of the UINavigationController not the UITabBarController, you can hide it by putting the following in your viewWillAppear method:
self.navigationController.navigationBarHidden = YES;
但是我很确定NavigationBar始终在顶部,因此我认为您要隐藏的栏实际上是您自己的工具栏.
But I'm pretty sure the navigationBar is always on top, so I think the bar you want to hide is actually your own toolbar.
self.myToolBar.hidden = YES;