¿Es posible modificar la altura de una sola celda en una vista de tabla agrupada?
Tengo una vista de tabla con 2 secciones de 3 y 2 filas ... Cambiaría la altura de fila de la segunda fila de la segunda sección ...tableView cell height ... ¿cómo personalizarlo?
¿Cómo puedo hacer esto?
Gracias!
Ok gracias! Pero tengo un problema ... si escribo un número como return 60.0; funciona mucho, pero si escribo algún código para devolver la altura en función de un texto UILabel, no aparece el fondo de la celda ... Agregué este código en el método cellForRowAtIndexPath: – matteodv
else if (indexPath.section == 1 && indexPath.row == 1) { \t \t descrizioneLabel = [[UILabel alloc] initWithFrame: CGRectMake (10, 5, 285, 50)]; \t \t descrizioneLabel.font = [UIFont boldSystemFontOfSize: 14.0]; \t \t descrizioneLabel.backgroundColor = [UIColor clearColor]; \t \t descrizioneLabel.numberOfLines = 0; \t \t descrizioneLabel.text = wish.descrizione; \t \t [cell.contentView addSubview: descrizioneLabel]; \t} – matteodv
y este es el método publicado por usted: - (CGFloat) tableView: (UITableView *) tableView heightForRowAtIndexPath: (NSIndexPath *) indexPath { \t \t si (indexPath.section == == 1 && indexPath.row 1) { \t \t NSString * test = descrizioneLabel.text; \t \t UIFont * cellFont = [UIFont boldSystemFontOfSize: 14.0]; \t \t CGSize constraintSize = CGSizeMake (280.0, MAXFLOAT); \t \t CGSize labelSize = [testo sizeWithFont: cellFont constrainedToSize: constraintSize lineBreakMode: UILineBreakModeWordWrap]; \t \t \t \t return labelSize.height; \t} \t \t return 44.0; } – matteodv