首页 > 其他 > 详细

刷新CollectionView 报错the item height must be less that the height of the UICollectionView minus the s

时间:2016-09-15 06:11:25      阅读:3367      评论:0      收藏:0      [点我收藏+]

数据请求到了之后 刷新CollectionView 出现下面的错误。

the behavior of the UICollectionViewFlowLayout is not defined because:

2015-03-16 10:56:45.898 XXXXX [664:60b] the item height must be less that the height of the UICollectionView minus the section insets top and bottom values.


有可能是数据在插入之前,页面还没有加载完,导致的错误。

网上找了好久,只要假如一句话就解决问题了:

 self.automaticallyAdjustsScrollViewInsets = NO;  

automaticallyAdjustsScrollViewInsets

为YES时,它会找view里的scrollView,并设置scrollView的contentInset为{64, 0, 0, 0}。如果你不想让scrollView的内容自动调整,将这个属性设为NO(默认值YES)。

 

刷新CollectionView 报错the item height must be less that the height of the UICollectionView minus the s

原文:http://www.cnblogs.com/songlei0601/p/5874151.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!