Rendering a UIWebView into an ImageContext

前端 未结 6 1117
伪装坚强ぢ
伪装坚强ぢ 2020-12-14 12:33

I am trying to capture the contents of a UIWebView including that which is not visible to the user. i.e. The whole web page even though the user is only looking at the top.<

6条回答
  •  天涯浪人
    2020-12-14 12:58

    Just to answer one of my questions, you can scroll the view by using javascript.

    So you use stringByEvaluatingJavaScriptFromString: with a javascript of window.scrollTo(0,%i);, where %i is where you want to scroll to. You can also use scrollY to retrieve the current scroll value.

提交回复
热议问题