UISearchDisplayController no muestra correctamente las celdas personalizadas

Así que tengo un tableView que tiene secciones y filas, y utiliza una clase de celda personalizada. La celda personalizada tiene una vista de imagen y algunas etiquetas. La vista de tabla funciona bien y la búsqueda funciona, excepto que la búsqueda no muestra ninguna de las etiquetas que están en mi clase de celda personalizada, solo la vista de imagen con la imagen correcta. Estoy bastante confundido en cuanto a por qué esto es así, especialmente porque la imagen todavía se muestra, pero no las etiquetas. Aquí hay algo de código.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {


//TODO: problem with search view controller not displaying labels for the cell, needs fixing
JSBookCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

if(cell == nil) {
    cell = [[JSBookCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

JSBook *book = nil;
//uses the appropriate array to pull the data from if a search has been performed
if(tableView == self.searchDisplayController.searchResultsTableView) {
    book = self.filteredTableData[(NSUInteger)indexPath.section][(NSUInteger)indexPath.row];
}
else {
    book = self.books[(NSUInteger)indexPath.section][(NSUInteger)indexPath.row];
}

FFMetaData *data = [self.ff metaDataForObj:book];
cell.titleLabel.text = book.title;
cell.priceLabel.text = [NSString stringWithFormat:@"$%@", book.price];
cell.authorLabel.text = book.author;
cell.descriptionLabel.text = book.description;

cell.dateLabel.text = [self.formatter stringFromDate:data.createdAt];
if(book.thumbnail == nil) {
    cell.imageView.image = [UIImage imageNamed:@"messages.png"];
    [self setCellImage:cell withBook:book atIndex:indexPath withTableView:tableView];
}
else {
    cell.imageView.image = [UIImage imageWithData:book.thumbnail];
}

return cell;

}

Antes de este problema, solo tenía una sección en el TableView, y todo funcionaba perfectamente. Ahora que tengo varias secciones y filas, la búsqueda se interrumpe como lo describí. ¿Algunas ideas? También por[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; solía tener[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; Pero ahora, si uso eso, obtengo una excepción rara cuando intento buscar:

NSInternalInconsistencyException ', razón:' solicitud de rect en ruta de índice no válida (2 índices [1, 1]) '

Así que eso también me confunde. ¡Gracias por la ayuda!

Respuestas a la pregunta(6)

Su respuesta a la pregunta