john doe
john doe

Reputation: 177

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 time.

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

Upvotes: 1

Views: 231

Answers (3)

justin
justin

Reputation: 104708

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

ps: a sample would help a lot

Upvotes: 0

Pixman
Pixman

Reputation: 599

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.

Upvotes: 0

NSResponder
NSResponder

Reputation: 16861

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

Upvotes: 1

Related Questions