Show activity indicator in SDWebImage

前端 未结 18 1419
独厮守ぢ
独厮守ぢ 2021-01-30 09:20

I\'m using SDWebView image and i want to show an Activity Indicator as placeholder, while fetching the image from remote.

I tried Malek\'s answer here How to show an act

18条回答
  •  不知归路
    2021-01-30 09:35

    For Swift 5.0 and SDWebImage 5.0 :

    Replace

    imageView.sd_setShowActivityIndicatorView(true)
    imageView.sd_setIndicatorStyle(.gray)
    

    By

    imageView.sd_imageIndicator = SDWebImageActivityIndicator.gray
    

提交回复
热议问题