美文网首页
The behavior of the UICollection

The behavior of the UICollection

作者: 婼熙之名 | 来源:发表于2022-09-07 17:40 被阅读0次
image.png

1.问题关键如下
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.

通过分析UICollectionView中cell的大小超出屏幕,一般是item计算时,因小数的问题导致的(如.333,.666),可通过Int取整进行避免。

2.可以通过捕获断点UICollectionViewFlowLayoutBreakForInvalidSizes去定位


image.png

问题解决后,断点将无法捕获。

相关文章

网友评论

      本文标题:The behavior of the UICollection

      本文链接:https://www.haomeiwen.com/subject/mdignrtx.html