我有html文件,我通过下面的代码加载
NSURL *htmlString = [[NSBundle mainBundle]URLForResource: @"index2" withExtension:@"html"];
NSAttributedString *stringWithHTMLAttributes = [[NSAttributedString alloc] initWithFileURL:htmlString options:@{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType} documentAttributes:nil error:nil];
UITextView *textView1 = [[UITextView alloc] initWithFrame:CGRectMake(20,20,self.view.frame.size.width,self.view.frame.size.height)];
textView1.attributedText=stringWithHTMLAttributes;
这里的问题是textview没有加载css文件,
NSAttributedString
字符串是否支持CSS?
如果是,请帮助我如何做到
提前谢谢:)