What's new

iPad iOS 3.2-4.2 image memory limit

popcorndrink

iPF Noob
Hi,

I have a webview, where I've created a pageflipper using CSS3.

This works great!

Here's some info about my solution:

- I have two active divs I from change and to
- The images displayed are rendered in a canvas tag
- I preload two images ahead of the current page using a div with background image
- I only allow the user to flip to the next page if the image has been loaded. So I set an onload callback method on the image to make sure the image gets loaded before flipping
- The images are stored remotely and they are 200 kb

Now, this implementation works for the first 20-25 200 kb remote images. After that, the onload method stops working.

If I don't preload the images it works great. However, it takes too long to load the next page since it hasn't been preloaded.

My theory is that the iPad just can't handle loading two of the same images.

So I created a hash table that stored the pages that had been loaded using preloading. When trying to flip to the next page, I first checked the hash table if the page had been loaded. This solved my onload problem. However, when I did the flip the image wouldn't display before after 2 seconds even though it had been loaded.

I've almost tried anything and I can't think of anything else. I've spent one week trying to fix this and I sincerely hope you guys have some input of what I can do.

It works in iOS 4.3 but 3.2-4.2 doesn't work, which I would like to support.

Thank you!
 

Most reactions

Latest posts

Back
Top