views:

99

answers:

1

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
A: 

http://stackoverflow.com/questions/932396/preventing-sqlite-from-escaping-backslash

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.

Brandon