ios 整形数组转换成字符串数组
2018-09-10 本文已影响0人
马金星
NSArray * ary = @[@1,@3];
1、先把数组转换成字符串
NSString *string = [ary componentsJoinedByString:@","];//,为分隔符
2、再把字符串转换成数组,即可把整形数组转换成字符串数组
ary = [string componentsSeparatedByString:@","];
3、ok
NSArray * ary = @[@1,@3];
1、先把数组转换成字符串
NSString *string = [ary componentsJoinedByString:@","];//,为分隔符
2、再把字符串转换成数组,即可把整形数组转换成字符串数组
ary = [string componentsSeparatedByString:@","];
3、ok