title: Display attributed text in textview in swift 3?
body: <p>I want to display text in Italic ,bold which is received from server .
  &lt; p > &lt; b > &lt; i > hello &lt; /i > &lt; /b > &lt; i >world&lt; /i >&lt; /p > so, </p>
  
  <pre><code>responseObj!["text"] = "&lt;p&gt;&lt;b&gt;&lt;i&gt;hello&lt;/i&gt;&lt;/b&gt;&lt;i&gt;world&lt;/&gt;&lt;/p&gt;"
       if let postText:String = responseObj!["text"] as? String{
            let str = try NSAttributedString(data: postText.data(using: String.Encoding.unicode, allowLossyConversion: true)!, options: [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType], documentAttributes: nil)
        self.textView.attributedText = str
      }
  </code></pre>
  
  <p>when i am adding like this means my text displays normal without applying bold &amp; italic . I want text to be displayed in bold ,italic .</p>