UILabel* label = [[UILabelalloc]initWithFrame:self.view.bounds];
label.numberOfLines=0;
[self.viewaddSubview:label];
NSString* htmlString =@"
这是一个段落
";
NSAttributedString* attrStr = [[NSAttributedStringalloc]initWithData:[htmlStringdataUsingEncoding:NSUnicodeStringEncoding]options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType}documentAttributes:nilerror:nil];
label.attributedText= attrStr;