Search code examples
iosobjective-cuiimageviewcocoapodssdwebimage

SDWebImage 4 - How I can cancel download request ?


In the new version of SDWebImage (by CocoaPods ver >= 4.x) sd_cancelCurrentImageLoad has deprecated and removed. How I can cancel download request?

Thanks.


Solution

  • After some researching, I found migration guide:

    UIImageView (WebCache) moved to UIView (WebCache), UIImageView objects still respond to those methods:

    • sd_imageURL
    • sd_cancelCurrentImageLoad
    • setShowActivityIndicatorView: renamed to sd_setShowActivityIndicatorView:
    • setIndicatorStyle: renamed to sd_setIndicatorStyle: