Skip to content

Commit

Permalink
pageEndReached
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Apr 9, 2024
1 parent 537e3da commit 3545520
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/CommonAppleKit/CAListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions Sources/CommonAppleKit/CAListViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Foundation
public protocol CAListViewCellDelegate: AnyObject {
func onCellTap(data: Any?)
func onAction(data: Any?)
func pageEndReached()
}

open class CAListViewCell<RootView: CAView>: CACollectionViewCell {
Expand Down

0 comments on commit 3545520

Please sign in to comment.