1 NSMutableArray *arr = [[NSMutableArray alloc] initWithArray:@[@"a",@"b",@"c"]]; 2 3 NSArray *arr1 = @[@"1",@"2"]; 4 5 NSRange range = NSMakeRange(0, arr1.count); 6 NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:range]; 7 [arr insertObjects:arr1 atIndexes:indexSet]; 11 12 NSLog(@"%@",arr);//
(
1,
2,
a,
b,
c
)
时间: 2024-10-12 17:42:07