tableView滑动到底部

时间:2024-01-16 16:15:38
- (void)scrollToBottom
{
NSInteger sectionCount = [self.dataSource numberOfSectionsInTableView:self];
NSInteger lastSectionRowCount = [self.dataSource tableView:self numberOfRowsInSection:sectionCount-1];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:lastSectionRowCount-1 inSection:sectionCount-1];
[self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewRowAnimationTop animated:YES];
}