1

我一直在我的一个应用程序中使用 UISearchDisplayController ,到目前为止它一直运行良好,直到我遇到问题。每当我尝试在 tableView 上搜索我的数据时,结果显示正确,但 UISearchDisplayController 的框架不正确。搜索结果最多显示屏幕高度的一半。我试图检查它并看到了一些解决方案。他们都没有工作,包括最著名的一个:

-(void)searchDisplayController:(UISearchDisplayController *)controller didShowSearchResultsTableView:(UITableView *)tableView
 {
CGRect frame = controller.searchResultsTableView.frame;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
   //Changing the frame size here
  }
}

它不能正常工作。有任何想法吗?

4

1 回答 1

1

如果有人感兴趣,@enreas 指出了正确的方向:https ://stackoverflow.com/a/19162257/968925

于 2014-10-10T10:44:40.217 回答