Quantcast
Channel: Check if a UIScrollView reached the top or bottom - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by JPN for Check if a UIScrollView reached the top or bottom

$
0
0

I figured out exactly how to do it:

CGFloat maxPosition = scrollView.contentInset.top + scrollView.contentSize.height + scrollView.contentInset.bottom - scrollView.bounds.size.height;CGFloat currentPosition = scrollView.contentOffset.y + self.topLayoutGuide.length;if (currentPosition == maxPosition) {  // you're at the bottom!}

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>