自定义UITableView,添加属性isLoadTableView
@property (nonatomic) BOOL isLoadTableView;
添加代理方法 (在代理方法加载最后一行后,跳到最后一行)
- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.row == [self numberOfRowsInSection:0]-1 && !self.isLoadTableView) {
self.isBackTableView = YES;
[self scrollToRowAtIndexPath:indexPathatScrollPosition:UITableViewScrollPositionBottom animated:NO];
}
}