PageLoaderTableViewDelegate
open class PageLoaderTableViewDelegate<CellType: UITableViewCell, Type: Equatable>: TableViewBlockDelegate<CellType, Type>
where CellType: Configurable
Basic UITableViewDelegate abstracting paging. When the TableView is scrolled to the bottom, will check if should fetch the next page.
-
Inits the Delegate.
Declaration
Swift
public required init(with dataSource: TableViewArrayDataSource<CellType, Type>, onSelected: @escaping ((Type) -> Void), shouldLoadNextPage: @escaping (() -> Bool), loadNextPage: @escaping (() -> Void))Parameters
withDataSource backing the TableView, where data will be extracted from.
onSelectedLogic to handle value selection.
shouldLoadNextPageValidation logic for page loading.
loadNextPageLogic to load next page.
-
UIScrollView Delegate method. Called when the scrolling ends.
Declaration
Swift
public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView)Parameters
scrollViewWhere the scrolling slowed.
View on GitHub
PageLoaderTableViewDelegate Class Reference