UISearchDisplayController框架问题

时间:2013-10-07 07:09:52

标签: ios7 xcode5 uisearchdisplaycontroller

我一直在我的一个应用程序中使用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
  }
}

它无法正常工作。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

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

相关问题