iOS Assertion Failure in UICollectionView

后端 未结 7 1384
抹茶落季
抹茶落季 2020-12-17 08:07

I\'m getting the error ...

*** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:], /SourceCache/UIKit/UIKit-237         


        
7条回答
  •  再見小時候
    2020-12-17 09:04

    You need to register like below:

    [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"MY_CELL"];
    

提交回复
热议问题