This doesn’t load my HTML string in the WebView.
NSString *htmlString = @"<html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>";
//I have a very large HTML content here.. For sample I have given a small content
[teaserWebView loadHTMLString:htmlString baseURL:nil];
Do I need to use some encoding? Any help will be appreciated.
Thanks
Edit: Solution found in comments on question.
In your large HTML, Replace%with%25.I really don’t know if that will help, but it is required in Android WebView. All encoding is automatic except it does not know whether or not to encode
%.There is a better way to encode everything, but it is not required and I have no clue how to do it in iPhone.
See this page for more info: http://www.w3schools.com/TAGS/ref_urlencode.asp
Also you may want to look up “URL Encode iPhone”.
I know this is not a URL, but in Android it gets converted to a
data:URL where all the data is in the URL. It likely works the same way in iPhone.