OC 富文本解析 html字符串
2019-08-28 本文已影响0人
osnail
NSString *htmlString = @"<p>\U6211\U4eec\U8981\U8ba4\U771f\U770b\U770b<p>"
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];