第三方record

2021-05-20  本文已影响0人  喵喵粉

OC

Swift

override public func prepare() {
        super.prepare()

        . . .

        columnHeights = (0 ..< numberOfSections).map { section in
            let columnCount = self.columnCount(forSection: section)
            let sectionColumnHeights = (0 ..< columnCount).map { CGFloat($0) }
            return sectionColumnHeights
        }
        
        这里补充下
        //section出现0列就return
        for subColumnHeight in columnHeights {
            if subColumnHeight.count == 0 {
                return
            }
        }
        . . .
上一篇 下一篇

猜你喜欢

热点阅读