好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

UILabel用原生方法显示HTML文本_html/css_WEB-ITnose

NSString * htmlString = @"  今天中午 去哪吃什么  ???    ";    NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];    UILabel * myLabel = [[UILabel alloc] initWithFrame:self.view.bounds];    myLabel.attributedText = attrStr;    [self.view addSubview:myLabel]; 

查看更多关于UILabel用原生方法显示HTML文本_html/css_WEB-ITnose的详细内容...

  阅读:35次