在我的iphone应用程序中,我已经实现了UISearchDisplayController,而在didSelectRowAtIndexPath方法控制器中的搜索不会在这个条件下进行。
if (tableView == self.searchDisplayController.searchResultsTableView )我在xib中添加了UISearchDisplayController,并在XIB中添加了UISearchDisplayDelegate,UISearchBarDelegate委托,有谁能告诉我控制器为什么不在里面?
发布于 2012-07-27 12:12:08
tableView不等于self.searchDisplayController.searchResultsTableView
移除if语句或将tableView设置为self.searchDisplayController.searchResultsTablevView。
如果有多个表视图,则可能忘记将搜索结果表连接到适当的委托和数据源。
https://stackoverflow.com/questions/11686162
复制相似问题