How to capture iPhone screen with UIImageView animation?

I have a UIImageView placed above the view and I want to capture the iPhone screen while the UIImageView animation is animated.

I can successfully capture screenshots of still frames of a UIImageView as follows:

[[myView layer] renderInContext:context];

However, when UIImageView animates throguh

[MyImageView startAnimating]

then these animated frames will not be recorded.

Is there any alternative to renderInContext currently available that can also capture animated frames?

NOTE. I know that UIGetScreenImage () is no longer accepted by Apple after updating iOS4.

+3
source share
1 answer

CALayers . CALayer -presentationLayer . [[[myView layer] presentationLayer] renderInContext:context]; .

+5

Source: https://habr.com/ru/post/1781412/


All Articles