risposta

-1

Fintanto che il delegato è impostato correttamente, è possibile restituire qualsiasi set di dati desiderato.

self.searchResults = @[@"some stuff", @"some more stuff", @"and so on..."]; 

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{ 
    if (tableView == [[self searchDisplayController] searchResultsTableView]) { 
    return [self.searchResults count]; 
    } 
    else { 
    return [self.data count]; 
    } 
} 
+0

La visualizzazione tabella non verrà visualizzata fino a quando non inizi a digitare il tuo nella barra di ricerca. –