Srikar Appalaraju
Srikar Appalaraju

Reputation: 73638

iOS UIImageView smooth Image presentation

One of the ways to improve user experience in iOS while showing images is to download them asynchronously without blocking the main thread and showing them....

But I want to add something to this -

  1. Initially when there is no image,show a spinner while the async download has started.
  2. After the download cache the image on local iOS disk for later use.
  3. After the download populate the image part of UIImageView.
  4. And dont just plonk the image into view for user. Showly Fade in the user (i.e. from alpha 0.0 to 1.0)

I have been using SDWebImage for sometime now. It works well but does not satisfy my 1st requirement (about spinner) and 4th.

Is there any help out there to satisfy all this?

Upvotes: 0

Views: 921

Answers (1)

Martin Ullrich
Martin Ullrich

Reputation: 100621

Three20 http://www.three20.info has a TTImageView class that statisfies 2-3, you can subclass it and overwrite setImage: and create the fade animation there. (or just modify TTImageView.m directly). Spinner is easy as well when you modify TTImageView you can add a TTActivityView on top and remove it on setImage:

Upvotes: 1

Related Questions