title: Reading in a text file in iOS
body: <p>How do I read in a text file into a textView? I have many different text files and the user selects which one is displayed, so that is why I don't just have a file name in there. I'm really confused about why this doesn't work. I found it right on the Apple Developer site in the section about reading from files to strings.</p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"%@" ofType:@"txt"];
  textFile = [[NSString alloc] initWithContentsofFile:path];
  textView.text = textFile;
  </code></pre>