私はAppleのTableSearchコード例に従っていますが、それは私にとってはうまくいきません。私は彼らがしたのと同じようにすべてをやっていると思います。以下のメソッドは、ユーザーが検索ボックスに何かを入力するたびに起動されるはずですが、サンプルアプリだけで起動されることはありません。
私のヘッダーファイルには次の実装があります。
@interface ContactsTableVC : UITableViewController <UISearchDisplayDelegate, UISearchBarDelegate>{
何が欠けているのか、他にどこを見ればいいのかわかりません。
NSLogが呼び出されることはありません。
助けてくれてありがとう!
- (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;
}