总的原则就是哪里的数据源发生了改变,就对哪里进行针对的刷新,而不是统一的[uitableview reloadData ]。
今天碰到的点赞,点赞的那个cell的点赞的人数变了,我的刷新这一条cell,
所以我就找到这个cell
NSIndexPath *ip = [NSIndexPath indexPathForRow:0 inSection:1];
TTDynamicsZanCell *zanCell=[self.detailTab cellForRowAtIndexPath:ip];
[self.detailTab reloadRowsAtIndexPaths:[NSArray arrayWithObjects:ip,nil] withRowAnimation:UITableViewRowAnimationNone];
,点赞的数目是在viewForHeaderInSection:这个协议方法里面更新的
所以下面还有一个[uitableview reloadData ]的方法,大家可能会有疑问就是为啥不直接写两个[uitableview reloadData ]方法,一个针对你的那个更新数据的cell,一个是针对于viewforheaderview这个视图的数据更新,但是我试过了,必须是谁更新了数据源,谁自己就更新自己,因为viewforheaderview的这个是协议方法,里面的view属于整个tableview的 ,所以就采用全局的刷新方法[uitableview reloadData ]方法