내 앱에서 맞춤 표보기 셀이있는 표보기가 있습니다. In iOS5 다음 코드 스 니펫을 사용하여 사용자 정의 된 셀의 정확한 높이를 가져옵니다. [tableView reloadData]를 수행 한 후 iOS6에서 [cell layoutIfNeeded]는 셀 layoutSubViews 메소드를 트리거하지 않습니다. 그리고 그로 인해 셀 높이가 잘못 계산됩니다. 이것이 무엇인지에 대한 좋은 제안이 있습니까? 아니면 그것을하는 다른 방법?iOS6 layoutIfNeeded가 UITableViewCell의 layoutSubViews를 트리거하지 않습니다.
- (CGFloat)tableView:(UITableView *)aTableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [self tableView:aTableView cellForRowAtIndexPath:indexPath];
[cell setNeedsLayout];
[cell layoutIfNeeded];
[cell sizeToFit];
return cell.frame.size.height;
}