0

I am encoding my HTML string as attribute with the following code..

NSAttributedString *attributedString = [[NSAttributedString alloc]
                                                initWithData: [itemDescribtionStr dataUsingEncoding:NSUnicodeStringEncoding]
                                                options: @{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType }
                                                documentAttributes: nil
                                                error: nil
                                                ];

How can I decode this string as an HTML string?

Duncan C
  • 128,072
  • 22
  • 173
  • 272
btmanikandan
  • 1,923
  • 2
  • 25
  • 45
  • You posted co that appears to create an NSAttributedString from HTML. It looks like you already HAVE an HTML string. What are you asking, exactly? – Duncan C Feb 04 '17 at 14:02
  • 1
    It's unclear what you are asking, but for the reverse process: http://stackoverflow.com/questions/5298188/how-do-i-convert-nsattributedstring-into-html-string – Larme Feb 04 '17 at 14:03

0 Answers0