简体   繁体   English

WKWebView / UIWebView获取网站图标

[英]WKWebView/UIWebView get website icon

How can I get the apple-touch-icon or logo of the website using WKWebView or UIWebView? 如何使用WKWebView或UIWebView获取网站的apple-touch-icon或徽标? I've read that getting a favicon is possible, however I plan on using the website's logo as a short cut like in iOS Safari and a favicon is too small for it. 我已经知道获得一个favicon是可能的,但是我计划将这个网站的徽标用作iOS Safari中的捷径,而且它的图标太小了。 Is there a way to scrape metadata from a website in webView to get <link rel="apple-touch-icon" href="apple-touch-icon.png"> ? 有没有办法从webView中的网站抓取元数据以获取<link rel="apple-touch-icon" href="apple-touch-icon.png">

在Firefox for iOS中,我们使用用户脚本 (链接到Github上的代码)来查找图标,然后将它们传递回应用程序,该应用程序使用本机代码 (链接到Github上的代码)下载它们。

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

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