场景为Tableview添加cell,可以确定上面的数据不会改变,只是在最后面添加一个cell,每收到一条数据,刷新tableview添加一个cell,可是每次都调用reloadData方法不划算,而且如果数据很多了会不会卡。看了下局部刷新感觉场景不适合啊。有没有什么好的解决方案。
光阴似箭催人老,日月如移越少年。
reloadData only refreshes the currently visible cells. Whether it will be stuck depends on your specific needs. It is best to timeProfile yourselfOnly add cells
- (void)insertRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
reloadData only refreshes the currently visible cells. Whether it will be stuck depends on your specific needs. It is best to timeProfile yourself
Only add cells