Tôi đang sử dụng đoạn mã sau để phát hiện nếu tôi đã đạt đến đáy của một UITableViewVấn đề phát hiện nếu UITableView đã cuộn xuống đáy
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
if(self.tableView.contentOffset.y >= (self.tableView.contentSize.height - self.tableView.bounds.size.height)) {
NSLog(@"bottom!");
NSLog(@"%@", [self getLastMessageID]);
[self getMoreStuff:[self getLastMessageID]];
}
}
này hoạt động tốt, nhưng vấn đề duy nhất là khi người dùng là kéo tableview xuống (như kéo để làm mới) mã cháy. Làm thế nào tôi có thể xử lý này?
Đừng quên thanh tab :( – Dmytro