这可能是一个重复的帖子,但我还没有找到解决方案.
我将我的UICollectionView
设定为:
UINib *nib = [UINib nibWithNibName:@"CollectionViewCell"
bundle:[NSBundle mainBundle]];
[_collectionView registerNib: nib forCellWithReuseIdentifier:@"bCell"];
(我试着设置一个委托,没有委托,等等).
但是,只有
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
人在
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
不算.
我已经判断了我返回的numberOfItemsInSection,它总是>;0(正好是17).
我查过打[_collectionView reloadData];
,但也没发生什么.
我try 过不同的方法,但我无法成功.
此外,我的UICollectionView
应该在这里,但不是:
有人有线索吗?