UICollectionView不调用collectionView: cellForItemAtIndexPath:
2016-12-30 15:42
591 查看
UICollectionView设置好代理,断点发现
- (NSInteger)collectionView:(UICollectionView
*)collectionView numberOfItemsInSection:(NSInteger)section 调用了。
- (__kindof
UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath
没有调用。
解决方法:控制器里 self.automaticallyAdjustsScrollViewInsets = NO;
- (NSInteger)collectionView:(UICollectionView
*)collectionView numberOfItemsInSection:(NSInteger)section 调用了。
- (__kindof
UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath
没有调用。
解决方法:控制器里 self.automaticallyAdjustsScrollViewInsets = NO;
相关文章推荐
- collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath 方法不调用
- UICollectionView - 调用delegate定义item大小后不调用collectionView:cellForItemAtIndexPath:函数的解决方法
- UICollectionView cellForItemAtIndexPath not called
- CollectionViewCell 不执行 cellForItemAtIndexPath 方法的问
- UICollectionView cellForItemAtIndexPath not called
- UICollectionView cellForItemAtIndexPath 方法不走
- UICollectionView cellForItemAt 不被调用
- iOS10 UICollectionView不调用cellForItemAtIndexPath
- 细节缺陷createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused
- iOS 探讨之 cellForRow/cellForItemAtIndexPath 函数不执行
- Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]
- UICollectionView recieved layout attributes for a cell with an index path that does not exist 解决办法
- iOS 运行出现:Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /Sourc
- CollectionVeiwCell和UICollectionView的手工创建
- 07 - collectionView滚到indexPath指定Cell
- UICollectionViewCell的indexPath问题
- Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]
- -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] ERROR
- UITableView中Cell报错[UITableView _configureCellForDisplay:forIndexPath:]
- 点击UICollectionViewCell上的UIButton如何获取当前的UICollectionViewCell?