How to determine height of UICollectionView with FlowLayout

前端 未结 13 2040
醉话见心
醉话见心 2020-11-28 18:01

I\'ve got an UICollectionView with an UICollectionViewFlowLayout, and i want to calculate its content size (for return in intrinsicContentSiz

相关标签:
13条回答
  • 2020-11-28 18:47

    assuming your collectionView is named as collectionView you can take the height as follows.

    let height = collectionView.collectionViewLayout.collectionViewContentSize.height
    
    0 讨论(0)
提交回复
热议问题