1 A * a1 = [A new];
2 A * a2 = [A new];
3 A * a3 = [A new];
4 A * a4 = [A new];
5 NSMutableArray *arr = [[NSMutableArray alloc]initWithArray:@[a1,a2,a3]];
6 [MyArr replaceObjectAtIndex:0 withObject:a4];

结果 MyArr = @[a4,a2,a3];

相关文章:

  • 2022-12-23
  • 2021-06-28
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2021-06-27
  • 2022-02-09
  • 2022-12-23
相关资源
相似解决方案