uitableview不滚动到底部
问题描述:
我有一个UITableView动态添加行。基本上是一个聊天应用。uitableview不滚动到底部
我需要reloadData后到的UITableView滚动到底
我的代码是:
当手动滚动,我甚至可以进一步滚动到这里:https://dl-web.dropbox.com/get/Screen%20Shot%202014-12-05%20at%2013.05.19.png?_subject_uid=44249794&w=AADtQEfMHMy0Ounri5W3gBTLNgR4uckT_gBdYQel9vD1qQ
我的代码:
[_chatTable reloadData];
NSIndexPath* indexPath = [NSIndexPath indexPathForRow: [[AppData getChatLog]count]-1 inSection: 0];
[_chatTable scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
我需要UITableView一直滚动到底部。
答
对不起,我无法打开指定的links.Try这
UITableView *yourTableView = yourTableViewToBeSetHere;
CGRect lastCellRect = CGRectMake(0, CGFLOAT_MAX, 50, 50);
// Scroll to the particular rect
[yourTableView scrollRectToVisible:lastCellRect
animated:YES];
祝你好运!
+0
仍给出了相同的结果 – 2014-12-08 08:42:42
u r在uitableview的底线中不可见 – 2014-12-05 11:33:37
将FOOTER VIEW添加到TABLEVIEW, – 2014-12-05 11:40:24
将尝试添加页脚视图 – 2014-12-08 08:43:05