I am calling heightForRowAtIndexPath to adjust my cells. When I edit my table view to delete cells the height of the cells stay fixed so the cells overlap which creates not a very appealing image. I would like to know how to change the height of the cell when deleting of the cells begins.
This is my current code
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
Favorites *favorite = [fetchedResultsController objectAtIndexPath:indexPath];
NSString *cellText = favorite.name;
UIFont *cellFont = [UIFont fontWithName:@"Helvetica" size:17.0];
CGSize constraintSize = CGSizeMake(280.0f, MAXFLOAT);
CGSize labelSize = [cellText sizeWithFont:cellFont constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap];
return labelSize.height + 20;
}
Any help will be appreciated! Thanks