Supplement: The principle of the above sample is that after the animation starts, the latest frame is continuously obtained through the presentationLayer in the low-priority sub-thread until the animation ends. Of course, you can use NSTimer to achieve this.
Use the presentationLayer attribute to get the latest frame.
Sample:
Reference link
Supplement:
The principle of the above sample is that after the animation starts, the latest frame is continuously obtained through the presentationLayer in the low-priority sub-thread until the animation ends. Of course, you can use NSTimer to achieve this.