in UICollectionView my cell's size must be 150+label.height. Now I'm using custom layout to calculate height = 150 if image exists inImageView if not height = 100. It's easy. But how to calculate label.height when i don't know what text i'll fetch from Api? Is there any function to get that?
let photoHeight = delegate.collectionView(collectionView, heightForPhotoAtIndexPath: indexPath) > 0 ? 150 : 100 let height = cellPadding * 2 + CGFloat(photoHeight) + (labelHeight??????)