Inserting a line break from a variable objective c

Posted by user337174 on Stack Overflow See other posts from Stack Overflow or by user337174
Published on 2010-05-19T19:12:57Z Indexed on 2010/05/19 19:30 UTC
Read the original article Hit count: 214

Filed under:
|
|

I am pulling data into my iphone application using xml. The xml value is then placed in a variable.

example variable:

123 London road \n London \n England

The variable is then set as a label.

I want the line breaks to appear in the label, instead it is printing \n.

If i manually set the label value

locationLabel.text = @"123 London road \n London \n England"

It works as i want it to.

Can anyone explain this?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c