I know the Apple documentation has the following delegate method:
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView; // called when scroll
Actually, rather than just putting @bensnider's code in scrollViewDidScroll, this code (written in Swift 3) would be better performance-wise:
func scrollViewDidEndDragging(_ scrollView: UIScrollView,
willDecelerate decelerate: Bool) {
if !decelerate {
checkHasScrolledToBottom()
}
}
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
checkHasScrolledToBottom()
}
func checkHasScrolledToBottom() {
let bottomEdge = scrollView.contentOffset.y + scrollView.frame.size.height
if bottomEdge >= scrollView.contentSize.height {
// we are at the end
}
}