UITableView infinite scrolling

If you need to know when you hit the bottom of the UITableView, become it’s delegate (because it is a subclass of UIScrollView), and use the -scrollViewDidScroll: delegate method to compare the table’s content height and it’s actual scroll position.

EDIT (something like this):

- (void)scrollViewDidScroll:(UIScrollView *)scrollView_ 
{   
    CGFloat actualPosition = scrollView_.contentOffset.y;
    CGFloat contentHeight = scrollView_.contentSize.height - (someArbitraryNumber);
    if (actualPosition >= contentHeight) {
        [self.newsFeedData_ addObjectsFromArray:self.newsFeedData_];
        [self.tableView reloadData];
     }
}

Leave a Comment