Objective-c:如何显示html< img>在没有UIWebView的iOS中将图片标记为图片 [英] Objective-c: How to display html <img> tags as images in iOS without UIWebView

查看:268
本文介绍了Objective-c:如何显示html< img>在没有UIWebView的iOS中将图片标记为图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为新闻网站开发一个iOS应用程序,应用程序从一个url中获取JSON数据,数据是一个HTML,有时候像这样嵌入图像:

I'm developing an iOS application for a news website, the application gets its JSON data from a url, the data is an HTML and sometimes has images embedded in them like this:

<div class="row ">some text here then <div class="col-xs-12 ">
<div class="col-sm-5 col-xs-12 pull-right">
<img src="image_url" /></div></div>

到目前为止,我知道如何获取文本(删除所有html标签),但我不知道如何显示嵌入到该字符串中的图像。

By far i know how to get only text (remove all html tags) but i don't know how to display the images that are embedded in that string.

有谁知道如何做到这一点?

Does anyone know how to do that ?

注意我研究了很多,并没有找到解决方案。

Note i researched a lot and didn't find a solution for this.

预先致谢。

推荐答案

我使用richContentLabel,
希望这会帮助你这里

I use richContentLabel , hope this will help you here.

这篇关于Objective-c:如何显示html&lt; img&gt;在没有UIWebView的iOS中将图片标记为图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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