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 :)

2
  • The solution is here, [answered][1] on stackoverflow. [1]: stackoverflow.com/questions/3482346/… Commented Feb 25, 2014 at 6:11
  • Can you add the content of your HTML file? You can also try with this anwser Commented Mar 5, 2014 at 12:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.