问题描述
当UISearchController的搜索栏变为活动状态时,它会隐藏视图的导航栏。我想让导航栏下方的搜索栏处于活动状态。
When a UISearchController's search bar becomes active, it hides the view's navigation bar. I'd like to have the search bar active below the navigation bar.
在iOS 7中,有一种很好的方法可以为 UISearchDisplayController 执行此操作这里:
In iOS 7 there was a good way to do this for UISearchDisplayController here: https://stackoverflow.com/a/12529945/3799720
但现在在带有UISearchController的iOS 8中,我无法弄清楚如何做到这一点。
But now in iOS 8 with UISearchController I can't figure out how to do this.
推荐答案
这可能有与UISearchController hidesNavigationBarDuringPresentation
属性有关。
This might have something to do with the UISearchController hidesNavigationBarDuringPresentation
property.
这篇关于防止UISearchController隐藏导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!