iOS SDWebImage fade in new image

后端 未结 8 1395
北海茫月
北海茫月 2021-01-31 06:36

I\'ve been using SDWebImage on my iPhone app to handle all of the image loading. I am using a placeholder image, and I want to crossfade or fade in the new image once it loads.

8条回答
  •  难免孤独
    2021-01-31 07:07

    Here is the code which help me out and working great.

    photoImageView.sd_imageTransition = .fade
    photoImageView.sd_setImage(with: URL(string: imageUrl), completed: nil)
    

提交回复
热议问题