UIImageView Animation too much memory consumption

后端 未结 4 1906
梦如初夏
梦如初夏 2021-01-14 03:39

I have a problem with memory and images that I am animating. First thing first, I am using ARC. On my initial screen I have about 60 images to animate. I am using this code

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-14 03:57

    The problem in your code is with the basic approach. You simply cannot hold all the decoded images in memory at the same time. I wrote a specific blog post on this subject which you can read here. The solution is to use a different approach, so that you only hold 1 frame of decoded image data in memory at once. That means frames of data need to be dynamically loaded as needed.

提交回复
热议问题