0

I would like to take partial screenshot of only 1 view in view hierarchy. The method I found for partial screenshoting is drawViewHierarchyInRect(_:afterScreenUpdates:), however this captures the while view hierarchy which I don't want.

This image shows what I mean

enter image description here

I only want to take a partial screenshot of a single view- in my case I want to take the screenshot of green area of the red view. How can I achieve that?

edit: the green area of red view is going to be shown in more than 1 view controller. The red view is large image and I do not want to draw that image on every view controller transition. I am thinking that it would be less intensive for iOS to just pass a small image(area covered by green color) around instead of large one

potato
  • 4,479
  • 7
  • 42
  • 99

0 Answers0