Comma-separated string to NSArray in Objective-C

前端 未结 2 976
误落风尘
误落风尘 2020-12-08 06:32

So I have no experience with arrays... But I need to use one to populate a UIPickerView. I am obtaining a list of objects via HTTP (NSURLConnection). This works fine. Curren

2条回答
  •  情书的邮戳
    2020-12-08 07:24

    Objective-C

    NSString *list = @"Karin, Carrie, David";
    NSArray *listItems = [list componentsSeparatedByString:@", "];
    

提交回复
热议问题