私はs を初めて使用します。プログラムで sUICollectionView
を追加しようとすると、特定のエラーが発生し続けます。UICollectionViewCell
私のアプリにUIViewController
は、UIView
. この 内UIView
には、上半分にいくつかのオブジェクトがあり、下半分にはUIScrollView
. これUIScrollView
は を保持しUICollectionView
ます。
UICollectionViewCell
カスタムをUICollectionView
プログラムでに追加しようとしていますが、次のエラーが発生し続けます。
[myViewController collectionView:cellForItemAtIndexPath:]: unrecognized selector sent to instance 0x1e01f5e0
2013-04-23 16:19:02.726 myAppName[28121:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[myViewController collectionView:cellForItemAtIndexPath:]: unrecognized selector sent to instance 0x1e01f5e0'
多少似たスレッドからほぼすべてのソリューションを試しましたが、何も機能しませんでした。
問題を引き起こしていると思われるコードは次のとおりです。
- (UICollectionViewCell *)myCollectionView:(UICollectionView *)myCollectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
NSMutableArray *data = [self.dataArray objectAtIndex:indexPath.section];
NSString *cellData = [data objectAtIndex:indexPath.row];
static NSString *cellIdentifier = @"cvCell";
UICollectionViewCell *cell = [myCollectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath];
UILabel *myCellTextLabel = (UILabel *)[cell viewWithTag:100];
[myCellTextLabel setText:cellData];
return cell;
}
リクエストされた情報を投稿できます!