diff --git a/Sources/CommonAppleKit/CAListView.swift b/Sources/CommonAppleKit/CAListView.swift index 9ad768a..86cd48a 100644 --- a/Sources/CommonAppleKit/CAListView.swift +++ b/Sources/CommonAppleKit/CAListView.swift @@ -95,6 +95,10 @@ open class CAListView< return .init() } + public func collectionView(_ collectionView: CACollectionView, willDisplaySupplementaryView view: CACollectionReusableView, forElementKind elementKind: String, at indexPath: IndexPath) { + cellDelegate?.pageEndReached() + } + #if canImport(AppKit) public func collectionView(_ collectionView: CACollectionView, itemForRepresentedObjectAt indexPath: IndexPath) -> CACollectionViewCell { collectionView.makeItem(withIdentifier: .init(cellId), for: indexPath) diff --git a/Sources/CommonAppleKit/CAListViewCell.swift b/Sources/CommonAppleKit/CAListViewCell.swift index 1a11395..f329bfa 100644 --- a/Sources/CommonAppleKit/CAListViewCell.swift +++ b/Sources/CommonAppleKit/CAListViewCell.swift @@ -11,6 +11,7 @@ import Foundation public protocol CAListViewCellDelegate: AnyObject { func onCellTap(data: Any?) func onAction(data: Any?) + func pageEndReached() } open class CAListViewCell: CACollectionViewCell {