Don't know what it is, but I just
can't make UISearchDisplayDelegate shouldReloadTableForSearchString method work the way I read the documentation:
You might implement this method if you want to perform an asynchronous search. You would initiate the search in this method, then return NO. You would reload the table when you have results.
This code is SUPPOSED to
prevent self.searchDisplayController. searchResultsTableView getting updated until searchString contains at least five characters (search initialization code elsewhere). However even the very first character in UISearchBar's text property brings up "No Results" view:
- (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString
{
BOOL len = ([searchString length]>=5) ?YES:NO;
NSLog(@"%@", len ? @"YES" : @"NO");
return value;
}
Seems like I'm not the only one with this problem, more tips at
Stack Overflow. Btw that trick with custom dimmed view didn't work for me, still got "No Results". Anybody got any more tips?
No comments:
Post a Comment