I am pulling my data from sqlite and trying to show it in a UIWebView
I have tried
HTMLData = [container stringByReplacingOccurrencesOfString:@"\n" withString:@"<br />"];
HTMLData = [HTMLData stringByReplacingOccurrencesOfString:@"\r" withString:@"<br />"];
HTMLData = [HTMLData stringByReplacingOccurrencesOfString:@"\r\n" withString:@"<br />"];
[refweb loadHTMLString:HTMLData baseURL:nil];
but none of them seems to be doing the job.
Any ideas?
This worked
what I did is I escaped the new line.
I didn’t just click “enter” while writing the code, but I copied and pasted from the database output in the console.