简体   繁体   English

如何在iOS中呈现HTML(标记,图像均显示)? 要搭配哪个组件?

[英]How to render HTML(tags,images both) in iOS? Which component to go with?

So, the scenario is I want to render a HTML string which can contain anything I mean text,images etc. And I have to show it in some control(UIWebView,UITextview,UILabel) as a cell in UITableView. 因此,方案是我要呈现一个HTML字符串,其中可以包含任何我想要的文本,图像等。并且我必须在UITableView中的某个控件(UIWebView,UITextview,UILabel)中将其显示为单元格。 Since i am making an e-book kind of app, lets say Kindle. 由于我正在开发一种电子书应用程序,因此可以说Kindle。 Tell me how to go with this. 告诉我该怎么做。 Please keep this in mind on long-press, I have to show UIMenuControl also; 长按时请记住这一点,我还必须显示UIMenuControl; to give options like highlight,copy,bookmark. 提供诸如突出显示,复制,书签之类的选项。 Please help. 请帮忙。

Here's an example of embedding a web view in a table view cell: 这是在表视图单元格中嵌入Web视图的示例:

http://gkbrown.org/2016/01/15/embedding-a-web-view-in-a-table-view-cell-using-markupkit/ http://gkbrown.org/2016/01/15/embedding-a-web-view-in-a-table-view-cell-using-markupkit/

The example uses the open-source MarkupKit framework to simplify the construction of the view. 该示例使用开源的MarkupKit框架来简化视图的构造。

因此,最后,我只使用UIWebView并借助javascript和jquery设法实现了我想要的目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM