Interface Builder に適切に接続された UISearchDisplayController があります。
delegate = Files Owner
searchBar = Search Bar
searchContentsController = Files Owner
searchResultsDataSource = Files Owner
searchResultsDelegate = Files Owner
UITableView を呼び出すとnumberoOfRowsInSection:
、正しい番号が返されます。
しかし、私の細胞はcellForRowAtIndexPath:
届かない:
- (UITableViewCell *)tableView:(UITableView *)tblView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tblView == searchController.searchResultsTableView){
NSLog(@"search will go here");
UITableViewCell* cell = [self provideSearchQueryCells:tblView identifer:@"searchQueryCell"];
STSymbol *aSymbol = [self.searchQueryResults objectAtIndex:indexPath.row];
cell.textLabel.text = aSymbol.symbol;
cell.detailTextLabel.text = aSymbol.symbol_title;
return cell;
}
else { ... }
それは常にelse条件になります。
正確な理由はわかりません。