This could be a duplicate post but I haven't found the solution.
I'm setting my UICollectionView
as:
UINib *nib = [UINib nibWithNibName:@"CollectionViewCell"
bundle:[NSBundle mainBundle]];
[_collectionView registerNib: nib forCellWithReuseIdentifier:@"bCell"];
(I've tried to set a delegate, without delegate, etcetera).
But then, only the
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
gets called while
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
doesn't.
I've checked the numberOfItemsInSection I return, and it's always > 0 (it's exactly 17).
I've checked to call [_collectionView reloadData];
and nothing happens either.
I've tried different things but I can't make it work.
Furthermore, my UICollectionView
should be here but it's not:
Does anyone have a clue?
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…