I have UIScrollView with many UIView views added to the content. I would like to convert UIView and its subviews to UIImage and I know how to do it if the UIView is currently visible on the device screen. Is it possible to convert UIView (subview in UIScrollView) into UIImage if UIView is not in UIScrollView visible rect?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Could you just iterate over all subviews taking a screenshot of each UIView inside the UIScrollView ?
The following class may help with taking screenshots: http://ioscodesnippet.com/2011/08/25/rendering-any-uiviews-into-uiimage-in-one-line/
Hope you find a solution.
Thanks, Michael