SHARE
TWEET

StackOverflow Question 14360930

a guest Jan 16th, 2013 52 Never
  1. NSString *filePath = @"/path/to/file.txt";
  2. NSString *myFile = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
  3. NSArray *items = [myFile componentsSeparatedByString:@"\n"];
  4.    
  5. [labelOne setStringValue:[items objectAtIndex:0]];
RAW Paste Data
Top