Skip to content

Instantly share code, notes, and snippets.

@pitt500
Created May 29, 2020 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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