是这样的:服务器返回字符串经过 Unicode转码后生成HTMLString,然后用UITextview加载,怎么才能让充满整个textview,
NSString *htemlString =[LBService stringFromUnicode:detailModel.contentStr];
NSAttributedString *attributedSting =[[NSAttributedString alloc]initWithData:[htemlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType} documentAttributes:nil error:nil];
self.textView.attributedText = attributedSting;
CGFloat height = [LBService stringSizeWithFont:[UIFont systemFontOfSize:12] string:htemlString width:300].height ;
self.textView.frame = CGRectMake(0, 64, 300, height
);
self.textView.contentSize =CGSizeMake(300, height);