Alex Tau
Alex Tau

Reputation: 2639

asynchronous method executing

I have a delegate method with the following tasks:

getting the image takes some time, depending on the network's speed so the result of its processing is displayed in the subview after that little while.

my problem: during the time between getting the image and showing the result the device looks unresponsive. any attempt to put some spinner, or any other method which is called inside this main procedure has no effect until the result is processed. how should I change this behaviour? I would like to put a big spinner during that waiting time.

thank you.

Upvotes: 0

Views: 298

Answers (2)

Daniel Blezek
Daniel Blezek

Reputation: 4549

I found the LazyTableImages to be very instructive on how to best implement this behavior. In my opinion, the spinner is to be avoided at all costs.

We also make use of NSOperationQueue to handle background loading of upwards of 500 images without slowing the UI down much.

Cheers, -dan

Upvotes: 0

stigi
stigi

Reputation: 6721

See iphone-dev-tips for a very basic approach on asynchronous fetching of a UIImage.

Upvotes: 3

Related Questions