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

分组最后一行颜色不起作用 #13

Open riluoxiyanghuanghun opened 2 months ago

riluoxiyanghuanghun commented 2 months ago

在UICollectionView当中,如果最后一行没有完全显示在屏幕中,切换背景分组颜色的时候,最后一行不起作用

kingjiajie commented 2 months ago

您好,感谢反馈,我进行一下排查。

riluoxiyanghuanghun commented 2 months ago

func toChangeCollectionReusableViewRoundInfo(_ layoutAttributes: UICollectionViewLayoutAttributes) { let attr = layoutAttributes as! JJCollectionViewRoundLayoutAttributes_Swift if (attr.myConfigModel != nil) { let model = attr.myConfigModel!; let view = self;

        if #available(iOS 13.0, *) {

            view.layer.backgroundColor = model.backgroundColor?.resolvedColor(with: self.traitCollection).cgColor
        } else {
            // Fallback on earlier versions
            view.layer.backgroundColor = model.backgroundColor?.cgColor;
        };

model个数应该是整个界面的model数量,但是我通过打印,数量并没有对上

kingjiajie commented 2 months ago

您好,这个正在排查修复中,如果方便是否可以提供一个简易的demo。我这边根据我的修复结果排查是否和你的问题一致