Can ios uicollectionview set different heights for different section?

for example, in section=0, when the height in section is 50, the height in section is 100. How to set this?

Mar.14,2021

you can search the waterfall flow and modify the system method in UICollectionViewLayout

  • (instancetype) init
  • (void) prepareLayout
  • (NSArray < UICollectionViewLayoutAttributes > ) layoutAttributesForElementsInRect: (CGRect) rect
  • (CGSize) collectionViewContentSize

The following methods of

UICollectionViewDelegateFlowLayout may be what you need.

  • (CGSize) collectionView: (UICollectionView ) collectionView layout: (UICollectionViewLayout ) collectionViewLayout referenceSizeForHeaderInSection: (NSInteger) section;
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37d82-2c0aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37d82-2c0aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?