首页 > 其他 > 详细

UICollectionView出现the behavior of the UICollectionViewFlowLayout is not defined because:

时间:2015-12-21 17:46:30      阅读:207      评论:0      收藏:0      [点我收藏+]

2015-01-28 21:55:17.790 Demo[636:9351] the behavior of the UICollectionViewFlowLayout is notdefined because:

2015-01-28 21:55:17.791 Demo[636:9351]the item height must be less than the height of the UICollectionView minus thesection insets top and bottom values.

错误原因:

UICollectionViewFlowLayout的itemSize的宽或者高设置的有问题!它的size必须在父容器的范围之内!

另外一种情况就是使用到了:

[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];

然后再对Cell进行初始化, 也会出现这个问题..

解决方法:

注册Cell的重用可以解决

UICollectionView出现the behavior of the UICollectionViewFlowLayout is not defined because:

原文:http://www.cnblogs.com/Rinpe/p/5063892.html

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