0

我需要显示一个包含大量图像的网格,但这会导致 ipad Safari 出现问题...我的项目类似于来自 famo.us 的专辑演示(您必须注册,https: //famo.us/demos ) ,我发现了这个:http ://www.fngtps.com/2010/mobile-safari-image-resource-limit-workaround/

如何通过 famo.us 解决这个糟糕的 safari 限制?

4

1 回答 1

0

So I have not tested this but I had an idea. Depending on what you are doing you could reused the <img> tags. If you using ImageSurface then you can add your default image and then add it. Then when it's off screen you can hide it and change the image it holds with setContent(imageUrl). Then just move it to the new location and reshow it.

I am not sure if that the best idea/option but it is what I would try first. I am doing something similar with svgs and normal surfaces in my game app.

EDIT: After doing a good bit of research this limitation has nothing to do with famo.us specifically. It seems that as of iOS 7 images have cause a number of sites to crash, including apple.com. The only work around I have found is the one you posted. Set the tags to something very small when you are done with them and try to keep the number of active images as low as possible.

于 2014-04-29T20:25:58.267 回答