您的位置:首页 > 产品设计 > UI/UE

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: