OC 富文本解析 html字符串

NSString *htmlString = @"

\U6211\U4eec\U8981\U8ba4\U771f\U770b\U770b

" NSAttributedString *attributedString = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];

你可能感兴趣的:(OC 富文本解析 html字符串)