1.将字符串拆分成数组
NSString *string = @"1,2,3,4"; NSArray *array = [string componentsSeparatedByString:@","];