iOS 如何在Label中显示html的文本

if (self.messageModel) {
        
        NSString * htmlString = self.messageModel.contentText;
        NSAttributedString * attrStr1 = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];  //就这句有用
        
        self.messageTextView.attributedText = attrStr1;
        
        if (1) {
            NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:@"【重要】"];
             [attrStr appendAttributedString:attrStr1];
            NSRange range = NSMakeRange(0, 4);
            [attrStr addAttribute:NSForegroundColorAttributeName value:GNHGreenColor range:range];
            self.messageTextView.attributedText = attrStr;
        }
    }

显示如下: