Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIWebview/WKWebivew WebP支持_Ios_Swift_Webp - Fatal编程技术网

Ios UIWebview/WKWebivew WebP支持

Ios UIWebview/WKWebivew WebP支持,ios,swift,webp,Ios,Swift,Webp,我试图通过API提供给我的webp图像链接来支持加载html。下面是一个假的html示例: let theBody = "<img src=\"https://www.gstatic.com/webp/gallery3/2_webp_ll.webp\">" webView.loadHTMLString(theBody, baseURL: nil) let theBody=“” loadHTMLString(theBody,baseURL:nil) 但是,这只是加载一个占位符:

我试图通过API提供给我的
webp
图像链接来支持加载html。下面是一个假的html示例:

let theBody = "<img src=\"https://www.gstatic.com/webp/gallery3/2_webp_ll.webp\">"
webView.loadHTMLString(theBody, baseURL: nil)
let theBody=“”
loadHTMLString(theBody,baseURL:nil)
但是,这只是加载一个占位符:

有时,我甚至可能会获取格式为
.png
的图像字符串,但webview的get请求显示内容类型仍然是
webp


如何使
UIWebView
/
WKWebView
支持webp?

UIWebView
WKWebView
(因此Safari和
SFSafariViewController
)不支持webp

在苹果增加支持之前,你对此无能为力