Obter tableView: heightForRowAtIndexPath: acontecer após tableView: cellForRowAtIndexPath :?
Eu tenho alguns UITableViewCells que precisam mudar sua altura dependendo do comprimento das seqüências dentro. Estou calculando a altura necessária dentrotableView:cellForRowAtIndexPath:
e, em seguida, armazená-lo em uma variável (self.specialRowHeight
). Então eu tenho:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == SPECIAL_SECTION) {
return self.specialRowHeight;
}
else {
return 44;
}
}
Exceto que parece estar sendo chamado antes dotableView:cellForRowAtIndexPath:
pouco, então é sempre zero.
Existe uma maneira de contornar isso, ou talvez uma maneira diferente de fazer isso?
Obrigado!