标签:uilabel uitextview html label nsattributedstring
挺简单,直接上代码了
NSString *strHtml = @"<b>提示</b><br/>1、测试测试测试测试测试测试测试测试测试测试测试测试<br/>2、测试测试测试测试测试测试测试测试测试测试"; NSAttributedString * strAtt = [[NSAttributedString alloc] initWithData:[strHtml dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil]; self.labelContent.attributedText = strAtt; self.textViewContent.attributedText = strAtt;
标签:uilabel uitextview html label nsattributedstring
原文地址:http://blog.csdn.net/u011439689/article/details/45307625