Why won't my UISearchDisplayController fire the shouldReloadTableForSearchString method when I enter

Posted by Gorgando on Stack Overflow See other posts from Stack Overflow or by Gorgando
Published on 2010-05-13T16:49:18Z Indexed on 2010/05/13 16:54 UTC
Read the original article Hit count: 425

I've been following Apple's TableSearch code example, but it's not working for me and I think I'm doing everything the same way they did it. The method below should be fired whenever the user types anything into the search box, but it never gets fired for me, just on the sample app. I have the appropriate @interface ContactsTableVC : UITableViewController { in the header file. I'm not sure what I'm missing or where else to look.

My NSLog never gets called.

Thanks for the help!

    - (BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString searchScope:(NSInteger)searchOption
{
    NSLog(@"The shouldreloadtableforsearchstring method has been called!");
    [self filterContentForSearchText:searchString];

    // Return YES to cause the search result table view to be reloaded.
    return YES;
}

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone