NSString *htmlStr = @"选择下面的<span style=\"color: red\">教室</span>";
NSAttributedString *att = [[NSAttributedString alloc] initWithData:[htmlStr dataUsingEncoding:NSUnicodeStringEncoding ] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil ];
self.label.attributedText = att;
iOS兼容HTML语句
最新推荐文章于 2022-06-10 17:57:45 发布