1:NSArray 转换为 NSMutableArray
NSArray *array = @[@"one",@"two"];
NSMutableArray *muArray = [NSMutableArray arrayWithArray:array];
2:NSDictionary 转换为 NSMutableDictionary
NSDictionary *dic = @{@"one":@"1",@"two":@"2"};
NSMutableDictionary *muDic = [NSMutableDictionary dictionaryWithDictionary:dic];
3:NSSet 转换为 NSMutableSet
NSSet *set = [[NSSet alloc]initWithObjects:@"one",@"two",nil];
NSMutableSet *muSet = [NSMutableSet setWithSet:set];
4:NSArray 转换成NSSet
NSMutableSet *muSet2 = [NSMutableSet setWithArray:array];
5:NSDictionary 转换成 NSArray
NSArray *allkeys = [dic allKeys];
NSArray *allvalues = [dic allValues];
6:字符串转换成数组
NSString *str = @"www.china.com";
NSArray *strArray = [str componentSeparatedByString:@"."]; //以 . 作为分隔符
NSLog(@"%@",strArray); // 打印为 (www,china,com)