1

I have html file which i am loading through below code

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;

The problem here is that textview is not loading css file , does NSAttributedString string support CSS ? If yes then please help me how to do it

Thanks In advance :)

DAMM108
  • 970
  • 2
  • 13
  • 27
  • The solution is here, [answered][1] on stackoverflow. [1]: http://stackoverflow.com/questions/3482346/how-do-you-use-nsattributedstring – zaheer Feb 25 '14 at 06:11
  • Can you add the content of your HTML file? You can also try with this [anwser](http://stackoverflow.com/questions/22090597/how-to-add-css-of-an-html-to-nsattributedstring/22178543#22178543) – André Rodrigues Mar 05 '14 at 12:03

0 Answers0