ios – UITableView滚动到底部

前端之家收集整理的这篇文章主要介绍了ios – UITableView滚动到底部前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有这行代码
  1. tableView.contentOffset = CGPointMake(0.0f,10000000.0f);

内容大小远小于10000000.0f,但UITableView仍然不会滚动到底部.我该怎么做?

解决方法

滚动到tableViewCell?
  1. //for instance,you have 15 cells
  2. NSIndexPath *indexPath = [NSIndexPath indexPathForRow:14 inSection:0];
  3. [self.tableView scrollToRowAtIndexPath:indexPath
  4. atScrollPosition:UITableViewScrollPositionTop
  5. animated:YES];

猜你在找的iOS相关文章