现学现卖;
一句代码:用途
当在选中所在单元格的时候想要改变tableview这个单元里的东西,如果用[self.tableview reloaddata]也能做到,可是这样做太不好了,这个方法会刷新整个tableview
就用到了下面的方法
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.tableview reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}