UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HIGHT)];
label.numberOfLines = 0;
NSString *htmlString = [Collect replaceNull:[response objectForKey:@"message"]];
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
label.attributedText = attributedString;
[label sizeToFit];
[self.view addSubview:label];
label上显示多样式文字
最新推荐文章于 2021-06-30 01:53:06 发布