在UILabel iphone中显示HTML文本 [英] Display HTML text in UILabel iphone

查看:102
本文介绍了在UILabel iphone中显示HTML文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从web服务获得HTML响应
下面是我得到的HTML响应

 < ; p>< strong>主题< / strong> Gud mrng。< / p> 
\\\
< p>< strong> Hello Everybody< / strong> ;:您好。< / p>
\\\
< p>< strong>我很好< / strong> ;: 1你呢。< / p>

我需要在UILabel中显示文本。



请帮助解决方案

使用RTLabel库转换HTML文本。我已经使用过好几次了。有用。这里是链接到图书馆和示例代码。



https ://github.com/honcheng/RTLabel



希望我帮了忙。


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

解决方案

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.

这篇关于在UILabel iphone中显示HTML文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆