Created
May 29, 2020 20:55
-
-
Save pitt500/fbe9fb65d9b1bb656739cd10b59b49d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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