giulio92 / GLTableCollectionView

Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2
MIT License
705 stars 37 forks source link

Easier UICollectionView size calculation #14

Closed giulio92 closed 7 years ago

giulio92 commented 7 years ago

UITableViewCell height - (UICollectionView top + bottom UIEdgeInsets)

This will avoid the UICollectionView to print multiple console errors if the programmer made a cell too big to fit in the UICollectionView frame. To correctly size a UICollectionViewCell just make sure to set the tableView heightForRowAt indexPath:, collectionViewLayout: insetForSectionAt section: and use the formula contained in collectionViewLayout: sizeForItemAt indexPath: