Search code examples
htmlxcodetextuilabel

Display HTML text in UILabel iphone


I am getting a HTML Response from a webservice Below is the HTML I am getting in response

<p><strong>Topic</strong>Gud mrng.</p>
\n<p><strong>Hello Everybody</strong>: How are you.</p>
\n<p><strong>I am fine</strong>: 1 what about you.</p>

I need to display the text in UILabel.

Please help


Solution

  • Use RTLabel library to convert the HTML text. I have used it several times. It works. Here is link to the library and a sample code.

    https://github.com/honcheng/RTLabel.

    Hope I helped.