UItableview滾動到底部分二種情況有tableviewfooter和無tableviewfooter
1有tableviewfooter
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:
[self.tableView numberOfRowsInSection:0]-1 inSection:0]
atScrollPosition:UITableViewScrollPositionTop animated:YES];
2無tableviewfooter
這個需要判斷是否有數據,有才滾動
if(_dataSourceArray.count > 0){
NSIndexPath *indexpath = [NSIndexPath indexPathForRow:_dataSourceArray.count-1? inSection:0];
[_tableView scrollToRowAtIndexPath:indexpath atScrollPosition:UITableViewScrollPositionBottom animated:NO];
}