Split string to array

iPhone SDK Tips & Tricks

NSString *fileContents = @”mu sample string...”
NSArray *phraseArray = [fileContents componentsSeparatedByString:@”\n”];

NSLog(@”%@”, [phraseArray objectAtIndex:0]);