UITableView 滚动到底部 [英] UITableView scroll to bottom

查看:60
本文介绍了UITableView 滚动到底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这行代码:

tableView.contentOffset = CGPointMake(0.0f, 10000000.0f);

内容大小比10000000.0f小很多,但是UITableView仍然没有滚动到底部.我该怎么做?

The content size is a lot less than the 10000000.0f, but the UITableView still does not scroll to the bottom. How can I do it?

推荐答案

滚动到 tableViewCell?

//for instance, you have 15 cells
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:14 inSection:0];
[self.tableView scrollToRowAtIndexPath:indexPath
                      atScrollPosition:UITableViewScrollPositionTop
                              animated:YES];

这篇关于UITableView 滚动到底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆