iOS UICollectionView prototype cell size property ignored

后端 未结 9 2104
花落未央
花落未央 2021-01-30 19:51

I\'m using a UICollectionView with two prototype cells. The prototype cells have different widths and contain different controls (image view and web view). I\'m definitely ret

9条回答
  •  不知归路
    2021-01-30 20:16

    If all the cells are the same size and you can set the itemSize on the UICollectionViewFlowLayout

    Example:

    ((UICollectionViewFlowLayout *) self.collectionViewLayout).itemSize = CGSizeMake(100, 100);
    

提交回复
热议问题