_UIReplicantView and snapshotViewAfterScreenUpdates how to get its content? _UIReplicantView and snapshotViewAfterScreenUpdates how to get its content? ios ios

_UIReplicantView and snapshotViewAfterScreenUpdates how to get its content?


I have struggled with exactly this issue, initially we worked around it by hooking into the NSRunLoop and rendering to an image and then merging them together. It was really messy.

Then we found a piece of code that would appear to solve this issue, but you have to be prepared to think outside the box a little bit.

That framework records a video of a UIWindow, we were then just stopping the record. Shoving it through a AVAssetImageGenerator (or something like that), and grabbing the image out.

As I say it's very much a weird way to solve it, but it seems to work okay for us.

The code for (ASScreenRecorder) can be found in this library here.

https://github.com/alskipp/ASScreenRecorder

One of our menu's in our product was OpenGL and some had video backgrounds! And this worked perfectly for us. But I cant be sure if it was something particular to our implementation and use of OpenGL. It definitely does work for camera views though as his example video's show.