HTMLText in Objective C
I have an UITextView which takes data from XML. Now that XML node is basically a html node viz.
"font face='Monaco' size='3'>Hello<b><i><font color=#EE0000>World</font&g开发者_开发技巧t;</i></b>123</font".
I have following code :
myTextView.text = value of the xml ("font face='Monaco' size='3'>Hello<b><i><font color=#EE0000>World</font></i></b>123</font").
How to convert this into html so that the UITextView translate the node into html.
You should use UIWebView and its loadHTMLString method:
-(void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html
精彩评论