Friday, May 14, 2010

f you want to read the file into a string, which you can then display in a UITextView, for example, then do this

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"important" ofType:@"txt"];
if (filePath) {
NSString *myText = [NSString stringWithContentsOfFile:filePath];
if (myText) {
textView.text= myText;
}
}

No comments:

Post a Comment