我有一个从XML中获取数据的UITextView。现在,该XML节点基本上是一个html节点。
"font face='Monaco' size='3'>Hello<b><i><font color=#EE0000>World</font></i></b>123</font".我有以下代码:
myTextView.text = value of the xml ("font face='Monaco' size='3'>Hello<b><i><font color=#EE0000>World</font></i></b>123</font").如何将其转换为html,以便UITextView将节点转换为html。
发布于 2010-12-09 18:57:39
您应该使用UIWebView及其loadHTMLString方法:
-(void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURLhttp://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html
https://stackoverflow.com/questions/4396793
复制相似问题