【发布时间】:2014-10-10 18:44:40
【问题描述】:
我一直在我的一个应用程序中使用 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
}
}
它不能正常工作。有什么想法吗?
【问题讨论】:
-
看看:stackoverflow.com/a/19162257/968925 它对我有用。
标签: ios7 xcode5 uisearchdisplaycontroller