iOS 6.0: UICollectionView doesn't respect clipsToBounds with pagingEnabled

后端 未结 4 1284
太阳男子
太阳男子 2021-02-06 07:37

Background

I am implementing a UICollectionView (for the first time) in an effort to achieve a paged horizontal scroll view of tiles. I\'d

4条回答
  •  春和景丽
    2021-02-06 08:29

    I'm not an expert in collectionView, but it could be possibly do with this line in cellForItemAtIndexPath:

    [cell.contentView addSubview:label];
    

    Everytime it's called, another label subview is added to cell. Either check for an existing label or subclass UICollectionViewCell?

提交回复
热议问题