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

实现步骤:

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

2.执行以下代码

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:section];
        [tableView beginUpdates];
        [tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
        [tableView endUpdates];
原文地址:https://www.cnblogs.com/wsnb/p/5408848.html