防止UISearchController隐藏导航栏 [英] Prevent UISearchController from hiding the navigation bar

查看:360
本文介绍了防止UISearchController隐藏导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当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 执行此操作这里: https://stackoverflow.com/a/12529945/3799720

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隐藏导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆