UIImageView in custom UICollectionViewCell returning nil all the time

后端 未结 5 1834
既然无缘
既然无缘 2020-12-29 05:02

OK in my story board I have made a UICollectionView with 3 cells. One of the cells I made a custom class for that obviously extends the UICollectionViewCell:

5条回答
  •  旧巷少年郎
    2020-12-29 05:38

    Also check this one,

    So now when you declare Custom CollectionView Cell in its Storyboard you need to specify the Attribute named "Identifier" under Collection Reusable View to some String. Now this may sound weired but , Check if name of Identifier is not same as Collection View Cell's class name. Class/File name of Cell and Cell Identifier must be Different.

    That really worked for me , hence posting.

提交回复
热议问题