UILabel展示html文本
NSString * htmlString =@"<html><body> Some html string \n <font size=\"13\" color=\"red\">This is some text!</font> </body></html>";
NSAttributedString * attrStr = [[NSAttributedStringalloc] initWithData:[htmlStringdataUsingEncoding:NSUnicodeStringEncoding]options:@{ NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType } documentAttributes:nilerror:nil];
UILabel * myLabel = [[UILabelalloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
myLabel.attributedText = attrStr;
[self.viewaddSubview:myLabel];