Taking first plunge with collection views and am running into this error:
Terminating app due to uncaught exception \'NSInternalInconsistencyException
Complementing what @jrtuton written... What you need is:
1) Register your nib file to "connect" it with your identifier:
//MyCollectionView.m
- (void) awakeFromNib{
[self registerNib:[UINib nibWithNibName:@"NibFileName" bundle:nil] forCellWithReuseIdentifier: @"MyCellIdentifier"];
}
2) Use your identifier to load your custom cell from a nib:
//MyCollectionView.m
- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath {
MyCustomCollectionViewCell* cell = [cv dequeueReusableCellWithReuseIdentifier:@"MyCellIdentifier" forIndexPath:indexPath];
}
3) Use always static NSString* to avoid the same identifiers again in your app.