如何把一个UITableView滚动到tableFooterView?

来源:互联网 发布:苹果id解锁软件下载 编辑:程序博客网 时间:2024/05/29 16:32

如果是平时滚动到最后一行的话,可以使用:

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:[self.datas count]-1 inSection:0];[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:NO];

这个被用烂的代码,看到就想吐,感叹网络给人类带来便利的同时,同质化问题也日益严重。(你的文章要是和别人一样,你就不要写了,也不要盗了,因为百度上面一搜都一样,还有什么用?)

哦,我错了,这是垃圾百度的问题,用谷歌就没事了。

那么,如何把一个UITableView滚动到tableFooterView?看以下代码:

[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:      [self.tableView numberOfRowsInSection:0]-1 inSection:0]      atScrollPosition:UITableViewScrollPositionTop animated:YES];

可能还有其他办法,那么就看这个网站吧:
http://stackoverflow.com/questions/1355674/how-to-scroll-a-uitableview-to-the-tablefooterview

0 0
原创粉丝点击