iOS 向可变数组中添加数组

    NSMutableArray *array = [NSMutableArray array];

    [array addObjectsFromArray:@[@"",@"",@"广",@""]];

    NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(2, 3)];

    [array insertObjects:@[@"00",@"11",@"22"] atIndexes:indexSet];

    

    DLog(@"1 == %@",array);

    [array removeObjectsInArray:@[@"00",@"11",@"22"]];

    DLog(@"2 == %@",array);

    [array insertObjects:@[@"44",@"55",@"66"] atIndexes:indexSet];

    DLog(@"3 == %@",array);

你可能感兴趣的:(iOS)