#pragma mark 监听提示框
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
//确认键
if (buttonIndex==1) {
//刷新数据模型
HMLOL*LOL = self.LOL[alertView.tag];
LOL.name = [alertView textFieldAtIndex:0].text;
//刷新tableView
//[self.table reloadData];
//刷新局部数据,哪个cell变了就刷新哪个
//获取索引
NSIndexPath*path = [NSIndexPath indexPathForRow:alertView.tag inSection:0];
//刷新索引的cell
[self.table reloadRowsAtIndexPaths:@[path] withRowAnimation:UITableViewRowAnimationLeft];
}
}
|
|