だから私はtableViewCellにcollectionViewを持っています。コレクションビュー内のTableViewCellとしてXIB
tableViewCellが私のストーリーボードにあったときに、すべてうまくいきました。
私は、ストーリーボードが遅れていたので、独自のXIBにtableViewCellを移動することに決めました。今ではエラーになります - >
****キャッチされない例外「NSInternalInconsistencyException」に起因するアプリを終了、理由:「種類のビュー をデキューできませんでした:識別子TagCellReviewとUICollectionElementKindCell - は、ペン先を登録する必要がありますか識別子のクラスまたはストーリーボードに プロトタイプセルを接続する「**** CellForRowAtIndexPathTableViewで
- >
static NSString *CellIdentifier = @"FeedReviewCell";
ReviewTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure the cell...
if (cell == nil) {
NSArray *customCell = [[NSBundle mainBundle] loadNibNamed:@"ReviewTableViewCell" owner:self options:nil];
cell = [customCell objectAtIndex:0];
cell.backgroundColor=[UIColor clearColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
cell.tagsCollectionView.delegate = self;
cell.tagsCollectionView.dataSource = self;
cellForItemAtIndexPath CollectionView - >
TagsCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TagCellReview" forIndexPath:indexPath];
cell.tagLabel.text = [reviewSection.serviceTags objectAtIndex:indexPath.row];
return cell;
これはどうして起こりますか?可能な解決策?
あなたのコレクションビューセルはどこで設計しましたか? xibまたはストーリーボード? – marosoaie
コレクションビューセルのペンでクラスを設定するのを忘れた –
コレクションビューセルのクラスを登録する必要があると思います。コレクションビューセルのためにnibを登録する必要があると思います。 – Mahesh