UICollectionView estimatedItemSize - last cell is not aligned

前端 未结 8 1772
春和景丽
春和景丽 2020-12-29 02:41

I want to make a usual horizontalScrolling flowLayout UICollectionView with estimatedItemSize and preferredLayoutAttributesFittingAttributes in cell. But there is something

8条回答
  •  青春惊慌失措
    2020-12-29 03:03

    You are setting estimatedItemSize in the init of view itself.

    You need to set it in some controller.

    Also,

    If all of your cells are the same height, use the itemSize property, instead of this property, to specify the cell size instead.

    Documentation: estimatedItemSize

提交回复
热议问题