I am retrieving values from mysql database (using PHP) and displaying it in UITextView and some portion in UIWebView. The Values that I had stored in database were in TEXT but when I display it in UITextView the data which I want to display in points gets displayed as a paragraph. How can I make a newline since the data that I receive is already in a NSString
I am retrieving values from mysql database (using PHP) and displaying it in UITextView
Share
UITextView puts a new line on
\n, UIWebView shows html and if you have just a plain text with some links or something, you may add a<br />for a new line.So in order to preserve line breaks for UITextView you need
\nand for UIWebView valid line-breaking-HTML (for example<br />).Not sure why you’re getting a paragraph, maybe you over-escape or something in you php routines?