开发者

iOS UIImageView smooth Image presentation

开发者 https://www.devze.com 2023-04-07 02:46 出处:网络
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....

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 m开发者_如何转开发y 1st requirement (about spinner) and 4th.

Is there any help out there to satisfy all this?


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:

0

精彩评论

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