是否有可能获取当前正在向表中插入新行的 IndexPath。表数据是通过核心数据加载的。数据按部分排序。 我想在表格中添加一个新行以进行动画处理,如下图链接所示。
最佳答案
您可以使用以下方法:
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
代码已经过测试,绝对适合您...
关于iphone - 为表格中新添加的行设置动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11030670/