Take a look at the method componentsSeparatedByString here .
Quick example taken from the link:
NSString *list = @"Norman, Stanley, Fletcher";
NSArray *listItems = [list componentsSeparatedByString:@", "];
this will lead to creation NSArraywith highlighted lines:{ @"Norman", @"Stanley", @"Fletcher" }
source
share