iOS---TextView显示HTML文本
_checkallintroducetextview = [[uitextview alloc] initwithframe:cgrectmake(10, 0, kscreenwidth-20, kscreenheight)];
_checkallintroducetextview.backgroundcolor = self.view.backgroundcolor;
_checkallintroducetextview.returnkeytype=uireturnkeydone;
_checkallintroducetextview.delegate = self;
_checkallintroducetextview.showsverticalscrollindicator = no;
nsattributedstring *attributedstring = [[nsattributedstring alloc] initwithdata:[@"后台返回给你的html格式的字符串" datausingencoding:nsunicodestringencoding] options:@{ nsdocumenttypedocumentattribute: nshtmltextdocumenttype } documentattributes:nil error:nil];
_checkallintroducetextview.attributedtext = attributedstring;
_checkallintroducetextview.textcolor = kcolor_gray_6;
[self.view addsubview:_checkallintroducetextview];
下一篇: ????不按剧本来