SHARE
TWEET

StackOverflow Question 14360930

a guest Jan 16th, 2013 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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