且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

UISearchDisplayController 表视图的自定义类

更新时间:2023-11-17 13:01:46

不确定是否可行.我认为问题在于 UISearchDisplayController 为其结果实例化了一个内部 UITableView .您必须子类化并重写它才能使用您的自定义 tableView,但我不建议这样做.

Not sure that's possible. I believe the problem is that UISearchDisplayController instantiates an internal UITableView for its results. You'd have to subclass and rewrite it to use your custom tableView, but I wouldn't recommend that.

在 iOS 8 中,您可以轻松地使用您自己的(自定义)tableView 来搜索结果,但这需要您迁移到较新的 UISearchController.

In iOS 8, you can easily use your own (custom) tableView for search results, but it requires you to migrate to the newer UISearchController.