【发布时间】:2014-12-05 11:28:42
【问题描述】:
我有一个 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 一直滚动到底部。
【问题讨论】:
-
你在 uitableview 的底线中不可见'
-
将 FOOTER VIEW 添加到您的 TABLEVIEW,
-
将尝试添加页脚视图
-
页脚视图只是将内容向上推了一点。对于长条目,其中一些仍然隐藏。
标签: ios xcode uitableview scroll