【发布时间】:2014-04-06 11:21:30
【问题描述】:
我的UICollectionView 单元格不会显示在 iOS6 上,因为我的委托方法 cellForItemAtIndexPath 没有被调用。我怀疑是因为这个警告:
the behavior of the UICollectionViewFlowLayout is not defined because:
the item height must be less that the height of the `UICollectionView`
minus the section inset's top and bottom values.
我在 iOS7 上没有收到警告,并且所有单元格也在那里正确显示。
我在.xib 中将我的collectionView 框架设置为高度270,并且没有定义任何插入。
我在.xib 中将单元格高度设置为270。
我可以在运行时打印出我的collectionView 帧,它是 271。
另外,我的collectionview 实际上是在一个自定义的tableview 单元格中。
有什么想法吗? 谢谢!
【问题讨论】:
标签: ios ios6 ios7 uicollectionview uicollectionviewlayout