Convert UIWebview contents to a UIImage when the webview is larger than the screen

后端 未结 5 1170
孤城傲影
孤城傲影 2020-12-02 19:20

Very similar to this question (and also this answer), I\'m trying to make an UIImage out from a webview. So far I\'m using the code suggested in the answer, specifically: <

5条回答
  •  生来不讨喜
    2020-12-02 20:04

    @Jibeex's answer worked for me. But I had to add the following code

        fullSizeFrame.size.width = self.scrollView.contentSize.width
    

    below

        fullSizeFrame.size.height = self.scrollView.contentSize.height
    

    for it to fully work. Writing as answer because I don't have enough reputation to comment.

提交回复
热议问题