WKWebView fails to load images and CSS using loadHTMLString(_, baseURL:)

前端 未结 10 822
抹茶落季
抹茶落季 2020-12-14 14:05

Apple\'s recommendation:

In apps that run in iOS 8 and later, use the WKWebView class instead of using UIWebView.

Thus, I have r

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 14:57

    I've been experimenting with this as well, with similar restrictions, and the problem appears to be that paths aren't resolved unless baseURL references the application bundle. It doesn't work if you, for example, have something in the application's documents.

    Edit: I have filed a radar for this rdar://29130863

提交回复
热议问题