Я пытаюсь определить, прокрутил ли пользователь до конца UITableView, чтобы я мог сделать некоторые дополнительные вещи. Чтобы правильно рассчитать вещи, мне нужно получить видимый прямоугольник UITableView. Как мне этого добиться?
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
[_refreshHeaderView egoRefreshScrollViewDidScroll:scrollView];
int currentMaxPosition = CGRectGetMaxY([self.tableView visibleRect]);
int currentMinPosition = CGRectGetMinY([self.tableView visibleRect]);
int tableViewBottom = [self.tableView bounds].size.height - 100;
int tableViewTop = 0;
//get older messages once we're near the bottom
if (currentMaxPosition > tableViewBottom - 100)
{
NSLog(@"WE AT THE BOTTOM!");
}
}