Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a table view cell's content view

Я расположил collectionView на tableview cell(самый верхний).

введите сюда описание изображения

Получаю ошибку:

Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a table view cell's content view. We're considering the collapse unintentional and using standard height instead. Cell: <CarTypeTableViewCell: 0x7f8f0bd13db0; baseClass = UITableViewCell; frame = (0 28; 414 101); clipsToBounds = YES; autoresize = W; layer = <CALayer: 0x600003dd0360>>

В чем может быть проблема?


Ответы (1 шт):

Автор решения: Hrayr

Я не знаю, почему не работает автоматическое определение, но можно поставить вручную

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.section == 0) {
        return 101;
    }
    return UITableViewAutomaticDimension;
}
→ Ссылка