// MARK: - UICollectionViewDelegate extension MyCollectionAdapter: AdaptiveCollectionLayoutDelegate { func collectionView(_ collectionView: UICollectionView, heightForTextAtIndexPath indexPath: IndexPath) -> CGFloat { if (indexPath.section == 0 && provider.isNeedToShowInfo) { // In this case I use this for banner in first section where it's occupies the whole area return AdaptiveCollectionConfig.bannerHeight } else if let _ = provider.items[indexPath.row] as? Bool { // In this case I use this for stub elements return AdaptiveCollectionConfig.placeholderHeight } let item = provider.items[indexPath.row] as! MyViewModel let textHeight = item.title.count // I get text height and as my font equal ~1pt, it's multiply and than addition it. Maybe you need to /// modify that value for greater stability height calculations. /// And you can get there image height for adding it to let extensionHeight = Double(textHeight) * 0.70 // It's for example, when you need to remove height //let dateHeight: CGFloat = item.expiring == nil ? -12.5 : 0 return AdaptiveCollectionConfig.cellBaseHeight + CGFloat(textHeight) + CGFloat(extensionHeight) //+ dateHeight } }