我正在使用原型细胞。但是我只在轮换时收到以下错误。请帮我解决这个问题
由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'could not dequeue a view of kind: UICollectionElementKindCell with identifier Cell
- 必须为标识符注册一个nib或类或在故事板中连接原型单元'
我正在使用Prototype单元格,并且单元格标识符是正确的。我只是在轮换时遇到了崩溃
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath {
if (_currentSelectedIndex == kFPSearchSegmentTypeOthers) {
if ((self.searchProductRecipesOrOthersArray &&
indexPath.item < self.searchProductRecipesOrOthersArray.count)) {
FPSearchRecipesOthersCollectionViewCell *cell =
[collectionView dequeueReusableCellWithReuseIdentifier:
kFPSearchRecipesOthersCollectionViewCellIdentifier
forIndexPath:indexPath];
}
}
}