WKWebView Screenshots

前端 未结 4 1044
天命终不由人
天命终不由人 2021-02-08 06:59

I am trying to capture the image that the webview is displaying to the user, so I can some color analysis of the web page. When I try to get the image from it\'s parent, I am ba

4条回答
  •  旧时难觅i
    2021-02-08 07:27

    Found myself in the same boat today but found a solution (by using private APIs).

    If you're not targeting the App Store and generally are not afraid of using private APIs, here's a way to capture screenshots of WKWebView's on OS X:

    https://github.com/lemonmojo/WKWebView-Screenshot

提交回复
热议问题