nsset有序,可是能夠打印出相同的元素,厲害

NSMutableSet *set = [NSMutableSet new];spa

[set addObject:@[@1,@2]];table

NSMutableArray *arrayC = [@[@1] mutableCopy]; [test

set addObject:arrayC];margin

NSLog(@"set=%@",set);tab

 

 

[arrayC addObject:@2];copy

NSLog(@"set=%@",set);co

 

NSMutableSet *setB = [set copy];background

NSLog(@"setB=%@",set);new

 

打印ab

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 ) )}

相關文章
相關標籤/搜索