Take the 2-minute tour ×

I'm storing text in a sqlite file and setting the text of a UITextView to be the value of that text. The only problem is that the UITextView isn't honoring the newline character. Instead, it's printing it out as text. Here's an example:

Stored in fruit.sqlite and passed to theFruit object:
requiredFruit = "apples\n oranges\n pears"

NSString *theFruit = [NSString stringWithFormat:@"%@", theFruit.requiredFruit];
generalOutlet.text = theFruit;

It Displays apples\n oranges\n pears but I want it to display

  • apples
  • oranges
  • pears
share|improve this question
possible duplicate of Preventing sqlite from escaping backslash –  Georg Fritzsche Aug 2 '10 at 5:05
add comment

1 Answer


sqlite files are WYSIWYG format apparently. I used a text editor to write an sql update statement and just used the return key when typing out the list. I then read that file from terminal and it seems to have worked out.

share|improve this answer
add comment

Your Answer


