Por razones de rendimiento, es habitual reutilizar las celdas UITableView '. ¿Hay alguna manera de hacer lo mismo con las vistas del encabezado de TableView? Estoy hablando de los que se devuelven con el método de delegado:Vistas del encabezado de TableView reutilizables
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
he tratado de hacer lo siguiente, que no parece estar funcionando como se esperaba:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
static NSString *CellIdentifier = @"Header";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [self getHeaderContentView: CellIdentifier];
}
return cell;
}
¿Hay una manera de reutilizar las vistas del encabezado?
A partir de iOS 6 ahora tiene 'UITableViewHeaderFooterView' que hace uso de la reuseIdentifier. – h4xnoodle
Pero actualmente no puede usar UITableViewHeaderFooterView con UI Builder. –