1 Answer
1

I don't think there's any firm limit that you'll encounter. However, you may run into memory limits if you use too many images. How large is each image uncompressed? That greatly affects this.

Of course, you probably know that there's no guaranteed amount of memory available for 3rd-party iOS apps. Depending on what else is running on the system, how many web pages the user has open in Mobile Safari, etc., different amounts of free memory will be available.

You may need to build it and experiment.

Just a point of reference. I had an app that was using animationImages, and the images were not quite full-screen (480 x 270 pixels). The images were 24-bit PNGs about 70KB each, compressed.

I found that I could only safely use about 10 of them, and not have to worry too much about getting shut down to handle low memory conditions. Now, at the time, I was targeting iPhone 3G, which is now getting to be quite old. But, you may still want to support iPhone 3G models.

You can certainly query the device model in your code, and set different defaults for how many images your app tries to load. If you want something more generic, that doesn't break when new iOS devices are released, you can ask the device about how much memory it has. Then, you could code your app to only load the even-numbered images if you detect you're running on a device with less memory.

You can also implement didReceiveMemoryWarning in your UIViewControllers, and choose to unload some of the images when you get memory warnings. This all assumes your animation is such that removing images simply makes the animation less smooth-looking, and doesn't make it non-functional altogether.