I need to indicated a 'new line' in a string in an XML file I'm loading.
If I hard code the string:
myTextView.text = [NSString stringWithString:@"Line1 \nLine2 \nLine3"];
It displays:
Line1
Line2
Line3
(as expected)
But if I put the exact string in my XML file:
<someNode string="Line1 \nLine2 \nLine3" />
And then load it into the UITableView it displays:
Line1 \nLine2 \nLine3
I've read somewhere that the '\n' character is processed at compile time, is this true? This would explain the behavior I'm seeing.
If this is the case, how else can I define a new line in my XML-loaded string and still have it properly processed in the UITextView? Is there another way to do this?
Thanks.