Skip to content

Commit

Permalink
footerReferenceSize
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Apr 12, 2024
1 parent de3e535 commit 5e1ac46
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/CommonAppleKit/CAListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ open class CAListView<
}
#endif

public var footerReferenceSize: CGSize {
didSet {
(self.collectionViewLayout as? CACollectionViewFlowLayout)?.footerReferenceSize = footerReferenceSize
// self.collectionViewLayout.invalidateLayout()
}
}

public init(
frame: CGRect,
itemSize: CGSize,
Expand All @@ -55,6 +62,9 @@ open class CAListView<
self.headerId = headerId
self.footerId = footerId
self.cellDelegate = cellDelegate

self.footerReferenceSize = footerReferenceSize

let layout = CACollectionViewFlowLayout()
layout.itemSize = itemSize
layout.minimumInteritemSpacing = minimumInteritemSpacing
Expand Down

0 comments on commit 5e1ac46

Please sign in to comment.