iOSTableview问题 如图
PHP中文网
PHP中文网 2017-04-18 09:25:23
0
3
246

如图蓝色框代表Tableview的大小,左边的图代表Tableview的默认显示,框内显示前面的数据。
右边的图是我想要实现的效果。默认显示最后的数据。我这里还要实现添加一条数据后,把第7行向上挤。这里显示第3到第8行的数据。
就是类似QQ发消息的情况。请问怎么做

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
黄舟

I found a simpler way

[_testTable setContentOffset:CGPointMake(CGFLOAT_MAX, CGFLOAT_MAX)];

But there is one thing I need to increase my cells. There is no animation effect when I increase them using this method.

PHPzhong

In ViewDidAppear, get the indexpath (that is, the last row), and then call SrollToRowAtIndexPath of tableView. Remember to turn off the animation effect. .

PHPzhong

srollToRowAtIndexPath

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!