点击某个按钮在tableView某个位置动态插入一行cell

实现步骤:

1.修改数据模型数组 给模型数组的某个位置增加一个模型

2.执行以下代码

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:section];
        [tableView beginUpdates];
        [tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
        [tableView endUpdates];

 

posted @ 2016-04-19 16:50  oneSong  阅读(964)  评论(0编辑  收藏  举报