我想替换NSMutableArray
obect 中的数组对象。我正在获取oldArray
并_alertsArray
改变它的价值,并想oldArray
用newArray
. 但是没有效果!!
NSArray *oldArray = (NSArray *)[_alertsArray objectAtIndex:[indexPath row]];
NSMutableArray *newArray = [[NSMutableArray alloc] initWithArray:oldArray copyItems:YES];
[newArray replaceObjectAtIndex:3 withObject:@"YES"];
[_alertsArray replaceObjectAtIndex:[indexPath row] withObject:newArray];