Shaz
Shaz

Reputation: 2704

Monotouch lazyload UIScrollView

In my application I have a UIScrollView that will load many very large images. I don't want to load all of them same time. Is it possible to load the images a few at a time so that everytime the user scrolls a couple more get added (and the ones that have already been scrolled are removed).

I really can't find anything online on how to do this.

Any help would be greatly appreciated. Thanks.

shahzad

Upvotes: 1

Views: 692

Answers (1)

miguel.de.icaza
miguel.de.icaza

Reputation: 32694

You could do this on demand, and load the image only when needed.

There are a few ways of doing this, the simplest is to hook up to the Scrolled event in the UIScrollView, and load the images on demand.

Upvotes: 1

Related Questions