NSMutableSet *set = [NSMutableSet new];
[set addObject:@[@1,@2]];
NSMutableArray *arrayC = [@[@1] mutableCopy]; [
set addObject:arrayC];
NSLog(@"set=%@",set);
[arrayC addObject:@2];
NSLog(@"set=%@",set);
NSMutableSet *setB = [set copy];
NSLog(@"setB=%@",set);
打印
2018-03-02 11:16:15.810777+0800 test[4534:321047] set={( ( 1 ), ( 1, 2 ) )}
2018-03-02 11:16:15.811008+0800 test[4534:321047] set={( ( 1, 2 ), ( 1, 2 ) )}
2018-03-02 11:16:15.811185+0800 test[4534:321047] setB={( ( 1, 2 ) )}