码迷,mamicode.com
首页 > 其他好文 > 详细

UICollectionView 中的警告提示

时间:2015-10-19 23:43:15      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:

通过xib创建的UICollectionViewCell,在xib中设置了cell size的宽和高,如果之后使用

flow.itemSize = CGSizeMake(cellWidth, cellHeight);动态修改了cell size,并且cell size的小于itemSize,会报一下错误,把xib的view尺寸拉大,并改变cell size的大小,就可以解决这个问题。

 

the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.

2015-10-19 22:04:05.893 meibo[37852:467001] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7ff2d042d7c0>, and it is attached to <UICollectionView: 0x7ff2d1091e00; frame = (0 0; 414 168.333); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x7ff2d06a9aa0>; layer = <CALayer: 0x7ff2d06a8690>; contentOffset: {0, 0}; contentSize: {0, 229}> collection view layout: <UICollectionViewFlowLayout: 0x7ff2d042d7c0>.

 

如果,默认高度229,如果itemSize大于229就会报警告

UICollectionView 中的警告提示

标签:

原文地址:http://www.cnblogs.com/aminopeptidase/p/4893261.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!