开发者

Performance problem about showing images

My problem is i have 50 images each is 157X157 pixels and take 25kb.They are connected to a slider and when the user slides the slider they change 0 to 100. It works but my problem is iphone 3g and 3gs is very slow its hard to see the images and sometimes it stuck for a second to show the next image. I use UIImageview to show the images.How can i do it better so the phone that before retina display can show them without stucking? Thanks for answers and your ti开发者_高级运维me.

edit: All pictures is in the file they are not taking from url.


Preload them when your app launches. Sending each of them a -size message should be enough to force them to load.


Maybe you can preload a lowRez version of your pictures ( like 78px ) when the slider move, you display the lowRez, and when it's stop, you swap to original picture.


convert them to the size they will be drawn at (don't rescale them on the fly).

ps: a sample would help a lot

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜