嗨,我正在开发小型iPhone应用程序。我得到这样的服务器字符串在IOS7中显示html标记值iphone
You can download the MyApp on the Google Play store:<a href='https://play.google.com/store/apps/details?id=com.myapp' style='display:inline-block;padding:0px;margin-left:10px'>MyApp</a>",
我想显示它为普通字符串与MyApp文本作为链接。这个怎么做。有没有办法做到这一点。 需要帮助。谢谢。
我试过,但仍然没有工作
NSAttributedString* attrStr = [[NSAttributedString alloc]
initWithString:@“You can download the MyApp on the Google Play store:<a href='https://play.google.com/store/apps/details?id=com.myapp' style='display:inline-block;padding:0px;margin-left:10px'>MyApp</a>"
attributes:[cell.answer.attributedText attributesAtIndex:0 effectiveRange:NULL]];
cell.answer.attributedText = attrStr;
'NSAttributedString'? 'UIWebView'? – Larme
我使用普通的NSString,并没有在webview中显示。这是正常的标签。 – nilkash
'NSAttributedString'等等。 – Larme