Skip to content

Instantly share code, notes, and snippets.

@pitt500
Created May 29, 2020 20:55
Show Gist options
  • Save pitt500/fbe9fb65d9b1bb656739cd10b59b49d6 to your computer and use it in GitHub Desktop.
Save pitt500/fbe9fb65d9b1bb656739cd10b59b49d6 to your computer and use it in GitHub Desktop.
private func isLastItem(index: Int) -> Bool {
index == (items.count - 1)
}
private func isOffsetReached(at index: Int) -> Bool {
index == (items.count - offset)
}
private func itemAppears(at index: Int) {
if isOffsetReached(at: index) {
isLoading = true
pagination {
self.isLoading = false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment