如图蓝色框代表Tableview的大小,左边的图代表Tableview的默认显示,框内显示前面的数据。右边的图是我想要实现的效果。默认显示最后的数据。我这里还要实现添加一条数据后,把第7行向上挤。这里显示第3到第8行的数据。就是类似QQ发消息的情况。请问怎么做
认证高级PHP讲师
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.
In ViewDidAppear, get the indexpath (that is, the last row), and then call SrollToRowAtIndexPath of tableView. Remember to turn off the animation effect. .
srollToRowAtIndexPath
I found a simpler way
But there is one thing I need to increase my cells. There is no animation effect when I increase them using this method.
In ViewDidAppear, get the indexpath (that is, the last row), and then call SrollToRowAtIndexPath of tableView. Remember to turn off the animation effect. .
srollToRowAtIndexPath