我一直在我的一个应用程序中使用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
}
}它不能正常工作。有什么想法吗?
发布于 2014-10-10 10:44:40
如果有人感兴趣,@enreas指出了正确的方向:https://stackoverflow.com/a/19162257/968925
https://stackoverflow.com/questions/19218903
复制相似问题