UISearchDisplayController 在没有变暗的 tableView 的情况下处于活动状态
我正在实现一个 UISearchDisplayController。 当控制器处于活动状态时,我会使用之前的搜索词加载 tableView,这样做是为了让用户可以轻松点击 searchField,将视图设置为搜索状态 - 但是如果用户最后 4-5 个搜索词之一是他们正在寻找的词,他们可以从 tableView 中选择它。
问题是,在 searchField 中输入任何内容之前,tableView 保持“变暗”状态。
我无法解决这个问题,请有人帮忙解决。我在 UISearchDisplayController 类文档或委托文档中没有发现任何关于调光的提及。
提前致谢。
I am implementing a UISearchDisplayController.
As the controller becomes active I load up the tableView with previous search terms, this is done so the user can easily tap the searchField, set the view in the search state - But if one of the users last 4-5 search terms is the one they are looking for they can just select it from the tableView.
The problem is that until anything is entered into the searchField then tableView remains "dimmed".
I have not been able so get around this, could someone please help figure it out. I have found no mention of the dimming in the UISearchDisplayController Class documentation or in the delegate documentation.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 iOS8 开始,您可以使用 dimsBackgroundDuringPresentation
属性
https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UISearchController/index.html#//apple_ref/occ/instp/UISearchController/dimsBackgroundDuringPresentation
Starting from iOS8 you can use the dimsBackgroundDuringPresentation
Property
https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UISearchController/index.html#//apple_ref/occ/instp/UISearchController/dimsBackgroundDuringPresentation
您可以尝试可怕的黑客攻击,这是此问题的选定答案。
You could try the horrible hack that's the selected answer to this question.