1. <small id='Pr4oO'></small><noframes id='Pr4oO'>

      <i id='Pr4oO'><tr id='Pr4oO'><dt id='Pr4oO'><q id='Pr4oO'><span id='Pr4oO'><b id='Pr4oO'><form id='Pr4oO'><ins id='Pr4oO'></ins><ul id='Pr4oO'></ul><sub id='Pr4oO'></sub></form><legend id='Pr4oO'></legend><bdo id='Pr4oO'><pre id='Pr4oO'><center id='Pr4oO'></center></pre></bdo></b><th id='Pr4oO'></th></span></q></dt></tr></i><div id='Pr4oO'><tfoot id='Pr4oO'></tfoot><dl id='Pr4oO'><fieldset id='Pr4oO'></fieldset></dl></div>

        <bdo id='Pr4oO'></bdo><ul id='Pr4oO'></ul>

        <legend id='Pr4oO'><style id='Pr4oO'><dir id='Pr4oO'><q id='Pr4oO'></q></dir></style></legend>
      1. <tfoot id='Pr4oO'></tfoot>

        iOS 通过 UIWebView 访问 Safari Reader 功能

        时间:2023-10-21
      2. <tfoot id='iYJaI'></tfoot>
          • <i id='iYJaI'><tr id='iYJaI'><dt id='iYJaI'><q id='iYJaI'><span id='iYJaI'><b id='iYJaI'><form id='iYJaI'><ins id='iYJaI'></ins><ul id='iYJaI'></ul><sub id='iYJaI'></sub></form><legend id='iYJaI'></legend><bdo id='iYJaI'><pre id='iYJaI'><center id='iYJaI'></center></pre></bdo></b><th id='iYJaI'></th></span></q></dt></tr></i><div id='iYJaI'><tfoot id='iYJaI'></tfoot><dl id='iYJaI'><fieldset id='iYJaI'></fieldset></dl></div>

              <bdo id='iYJaI'></bdo><ul id='iYJaI'></ul>
            • <legend id='iYJaI'><style id='iYJaI'><dir id='iYJaI'><q id='iYJaI'></q></dir></style></legend>

              <small id='iYJaI'></small><noframes id='iYJaI'>

                    <tbody id='iYJaI'></tbody>

                  本文介绍了iOS 通过 UIWebView 访问 Safari Reader 功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 iOS 4.3 &想知道是否有任何方法可以访问 的东西.但我不知道如何通过 UIWebView 使用它.还有一些网站Safari的Reader接电话不开启Reader"功能,可能是信心不足?

                  解决方案

                  实际上,阅读器按钮会在解析 HTML 页面的地方进行一些分析,然后看到要解析的清晰 body 标签.如果该插件能够提取确切的正文,它将启用阅读器按钮(我对可读性源代码的理解).现在要为 webview 实现相同的功能,您只需在代码中嵌入 java 脚本(该 java 脚本已经在可读性源代码中可用),然后您就可以达到相同的效果.

                  但我怀疑苹果的未来计划也是如此.因为他们不能让其他任何人来做这个内容提取,同时与 iCloud 相关的巨大商机和可读性相结合.

                  如果您愿意,您可以简单地从 UIWebView 中提取 HTML,然后提取正文并将其用于您的目的.提取它并不是一门火箭般的科学.

                  从分析的角度来看,随便有10个HTML页面启用了Reader按钮,你会看到核心内容只属于body,其余的add、header、footer是分开的.

                  我相信现在是重新发明我们使用的网络内容的时候了,这是这样做的完美例子.

                  I am using iOS 4.3 & was wondering if there is any way that I can access the Safari's "Reader" feature through which webpages are removed of ads & other riff raff & the content takes the center stage.

                  If one opens any article in Safari (on say Wikipedia website), then a "Reader" button appears on the URL bar. Clicking on it presents a new window presenting the content beautifully.

                  How can I leverage this this functionality in iOS through UIWebView ?

                  PS: I know there is something called Readability Project. But I have no idea how to use this through UIWebView. Also for some websites Safari's Reader takes a call not to enable "Reader" feature, maybe it has no sufficient confidence?

                  解决方案

                  Actually reader button do a bit of analysis where it parse the HTML Page and then it sees a clear body tag to parse. If that plugin is able to extract the exact body it will enable the reader button (My understanding from the readability source code). Now to implement the same for webview you just need to embed java script in your code (this java script is already available in the readability source code) and then you can achieve the same effect.

                  But I suspect the future plan from apple for the same. Because they can not just let anyone else do this content extraction with the huge business opportunity associated with iCloud with the combination of readability.

                  If you want you can simple extract the HTML from UIWebView and then extract the body and use it for your purpose. It's not a very rocket science to extract.

                  For analysis point of view, just have randomly some 10 HTML pages with Reader button enabled, you will see the core cotent belongs to body only and rest of the add, header, footer are separated.

                  I believe this is the time to re-invent the web content we use, and this is the perfect example of doing the same.

                  这篇关于iOS 通过 UIWebView 访问 Safari Reader 功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:iPhone - 自动调整 UIWebView 内容的大小不适合框架 下一篇:如何在 iOS 中使用共享表共享文件?

                  相关文章

                  <small id='unYno'></small><noframes id='unYno'>

                    <bdo id='unYno'></bdo><ul id='unYno'></ul>

                    <i id='unYno'><tr id='unYno'><dt id='unYno'><q id='unYno'><span id='unYno'><b id='unYno'><form id='unYno'><ins id='unYno'></ins><ul id='unYno'></ul><sub id='unYno'></sub></form><legend id='unYno'></legend><bdo id='unYno'><pre id='unYno'><center id='unYno'></center></pre></bdo></b><th id='unYno'></th></span></q></dt></tr></i><div id='unYno'><tfoot id='unYno'></tfoot><dl id='unYno'><fieldset id='unYno'></fieldset></dl></div>

                    <legend id='unYno'><style id='unYno'><dir id='unYno'><q id='unYno'></q></dir></style></legend>
                    1. <tfoot id='unYno'></tfoot>