Loading images for animation in UIImageView - iOS

前端 未结 4 1244
轮回少年
轮回少年 2020-12-19 15:11

I have around 300 images to be loaded for animation the images are named loading001.png, loading002.png, loading003.png, loading004.png………loading300.png

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-19 16:15

    Your code will crash when run on the device, it is just not possible to decompress that many images into memory on iOS. You will get memory warnings and then your app will be killed by the OS. See my answer to how-to-do-animations-using-images-efficiently-in-ios for a solution that will not crash on the device.

提交回复
热议问题