iSearchDisplayController结果表在iOS7中的位置问题
试图在UINavigationBar中实现UISearchBar我的结果表视图位置出错图2: 我花了几天时间来解决这个问题,但没有成功 谢谢 编辑 在我的视图中:iSearchDisplayController结果表在iOS7中的位置问题,ios7,uinavigationbar,uisearchbar,Ios7,Uinavigationbar,Uisearchbar,试图在UINavigationBar中实现UISearchBar我的结果表视图位置出错图2: 我花了几天时间来解决这个问题,但没有成功 谢谢 编辑 在我的视图中: [self.searchDisplayController.searchBar setPlaceholder:NSLocalizedString(@"SEARCH_PLACEHOLDER", nil)]; [self.searchDisplayController setDisplaysSearchBarInNavigationB
[self.searchDisplayController.searchBar setPlaceholder:NSLocalizedString(@"SEARCH_PLACEHOLDER", nil)];
[self.searchDisplayController setDisplaysSearchBarInNavigationBar:YES];
我的SearchDisplayController委托方法:
-(void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope
{
//filter work repfectly
}
-(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
{
[self filterContentForSearchText:searchString
scope:[[self.searchDisplayController.searchBar scopeButtonTitles]
objectAtIndex:[self.searchDisplayController.searchBar selectedScopeButtonIndex]]];
return YES;
}
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar
{
NSPredicate *resultPredicate = [NSPredicate predicateWithFormat:@"not (isFav == 100)"];
[_fetchedResultsController.fetchRequest setPredicate:resultPredicate];
[self performFetch];
}