NSArray* array=@[@"test1",@"test2",@"test3",@"test4",@"test5",@"test6",@"test7"];
//将数组合并成一个字符串
NSString* appendStr=[array componentsJoinedByString:@" "];
NSLog(@"appendStr=%@",appendStr);
//将字符串拆分成数组
NSArray* resolutionArray=[appendStr componentsSeparatedByString:@" "];
NSLog(@"resolutionArray=%@",resolutionArray);
网友评论