How to speed up the animation if we use images in the iPhone SDK?

I have a series of images for animation, for example an image from 1 to 1000.

I plan to show these images in sequence at the same speed to show the animation.

I want to know if there is a way to speed up the animation? Can I speed up the image display?

Please let me know.

0
source share
3 answers

Use GIF images to play animations. Playing GIFs with OpenGLES is a good practice, and I think this is the best way to play animations.

Follow the Git Link: https://github.com/jamesu/glgif

:)

+1
source

There are so many ways, but the easiest way is to pass an array of images to the UIImageView animationImages property. then call start Animating to start the animation and the stopAnimating method to stop the animation.

UIImageView also has an animationDuration property, which allows you to set the duration for all images.

You can also display images using OpenGL, which compares much faster with UIImageView. because OpenGL uses a GPU.

0
source

The solution is to skip frames of the animation. So, if you want to double the speed, you will draw 0,2,4,6 frames or 1,3,5,7 animation sequence. If you want to triple the speed, you will draw 0,3,6,9, etc. Etc. This is a missing frame :)

0
source

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


All Articles