i have a html string that’s like:
[div][p]some text here[/p][img src=@”url”][b] here’s image[/b][/div]
How can i programmatically create something like this:
(UILabel) some text here
(UIImage) display the image
(UILabel) (in bold)here’s image
Important thing here is to parse the html content, get all paragraphs, brs, images, and then create uiimages and uilabels programmatically, calculating each one frame.
Sounds like a lot to do, but can someone give me an idea? Thank you! (PS I know how to programmatically add views)
Perhaps you want to use the
UIWebViewinstead?It has a method named
loadHTMLString:baseURL:that you can use, to have it display HTML from a string.