We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49330ef commit e0bf7f2Copy full SHA for e0bf7f2
AlignedCollectionViewFlowLayout/Classes/AlignedCollectionViewFlowLayout.swift
@@ -286,7 +286,12 @@ open class AlignedCollectionViewFlowLayout: UICollectionViewFlowLayout {
286
var lineFrame = layoutAttributes.frame
287
lineFrame.origin.x = sectionInset.left
288
lineFrame.size.width = lineWidth
289
- return super.layoutAttributesForElements(in: lineFrame) ?? []
+ let result = super.layoutAttributesForElements(in: lineFrame)
290
+ if let result = result, !result.isEmpty {
291
+ return result
292
+ } else {
293
+ return [UICollectionViewLayoutAttributes()]
294
+ }
295
}
296
297
/// Copmutes the alignment axis with which to align the items represented by the `layoutAttributes` objects vertically.
0 commit comments