Anyone know the best way to read text from a simple .txt file and store it in an NSString? I'm trying to do it like this:
NSString *data = [[NSString alloc] initWithContentsOfFile"data.txt"];
The data.txt file is in the same source folder as this code. I want to do something similar to reading from a file using Java's Scanner. Thanks for any help!
NSString *data = [[NSString alloc] initWithContentsOfFile"data.txt"];
The data.txt file is in the same source folder as this code. I want to do something similar to reading from a file using Java's Scanner. Thanks for any help!