UIScrollView: detect if we are at bottom

30 Dec
2009

Because it took me AGES. Here’s the snippet.

UIScrollView *scrollView = _tableViewController.tableView;
if(scrollView.contentOffset.y >=  scrollView.contentSize.height - scrollView.frame.size.height) {
MRDINFO(@"we are at bottom");
_needScrollDown = YES;
}else {
MRDINFO(@"we're somewhere else");

Related posts:

  1. Detect conflicting Objective C category methods
  2. Fix Mobile WebKit target behavior on OS 3.0
  3. Detect if an iPhone is jailbroken

2 Responses to UIScrollView: detect if we are at bottom

Avatar

Alex

December 31st, 2009 at 1:36 pm

Auweh, das wäre so ähnlich auch im stanford podcast vorgekommen… ;-)

Avatar

Aditya

December 10th, 2011 at 6:45 am

Working.. many thanks.. this is so helping me..

Comment Form

top

Switch to our mobile site