kingjiajie / JJCollectionViewRoundFlowLayout_Swift

JJCollectionViewRoundFlowLayout_Swift是JJCollectionViewRoundFlowLayout(OC:https://github.com/kingjiajie/JJCollectionViewRoundFlowLayout )的Swift版本,JJCollectionViewRoundFlowLayout可设置CollectionView的BackgroundColor,可根据用户Cell个数计算背景图尺寸,可自定义是否包括计算CollectionViewHeaderView、CollectionViewFootererView或只计算Cells。设置简单,可自定义背景颜色偏移,设置显示方向(竖向、横向)显示,不同Section设置不同的背景颜色,设置Cell的对齐方式,支持左对齐,右对齐,居中。
MIT License
73 stars 13 forks source link

解决设置了计算头和尾后, 但返回的第一个section的footer大小为0, 引起的crash #6

Closed mengshun closed 2 years ago

mengshun commented 2 years ago

测试方法: 将如下代码插入 NextViewController.swift 的 153 行后, 点击列表的第三项进入, 即可复现 Crash.

if section == 0
        && isRoundWithHeaerView
        && isRoundWithFooterView {
            return .zero
 }

image

image

kingjiajie commented 2 years ago

非常感谢对代码问题的指出。已对PR进行审核合并了。