ios - 带有 NavigationBarHidden 的导航 Controller

标签 ios objective-c uinavigationcontroller uinavigationbar

我这样调用 SearchViewController

[self.navigationController pushViewController:SearchViewController animated:YES];

在 SearchViewController 中我不想要导航栏,我想完全隐藏它,任何人都可以在这方面帮助我。

最佳答案

隐藏导航栏:

[[self navigationController] setNavigationBarHidden:YES animated:YES];

显示导航栏:

[[self navigationController] setNavigationBarHidden:NO animated:YES];

我建议阅读文档 here , 这是一本好书。

希望对您有所帮助!

关于ios - 带有 NavigationBarHidden 的导航 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32103083/

相关文章:

ios - 为什么 UIBarButtonItem 在 segue 之前不调用 IBAction?

ios - 放置在 UITableViewController 顶部时看不到搜索栏

objective-c - UISearchBar\UISearchDisplayViewController 的问题

iphone - 在 iOS 应用程序中计算时间间隔

ios - 是否可以使导航栏中的大标题可点击(iOS)

cocoa-touch - 我可以手动触发 viewController 上的任何调用supportedInterfaceOrientations吗?

ios - 更改 NavigationItem 提示时出现奇怪的动画

ios - Animate UICollectionViewLayout header 大小会导致不必要的 Flash 交叉溶解

iphone - 如何显示 iCarousel 中心 View 仅突出显示其他最近的 View 显示一些黑暗

ios - 根据数据返回零单元