SDWebImageImpl

open class SDWebImageImpl : NSObject, ImagePlugin, @unchecked Sendable

SDWebImage图片插件,启用SDWebImage子模块后生效

Accessor

  • 单例模式

    Declaration

    Swift

    @objc(sharedInstance)
    public static let shared: SDWebImageImpl
  • 图片加载完成是否显示渐变动画,默认false

    Declaration

    Swift

    open var fadeAnimated: Bool
  • 图片加载时是否显示动画指示器,默认false

    Declaration

    Swift

    open var showsIndicator: Bool
  • 图片占位图存在时是否隐藏动画指示器,默认false

    Declaration

    Swift

    open var hidesPlaceholderIndicator: Bool
  • 自定义动画指示器句柄,参数为是否有placeholder,默认nil

    Declaration

    Swift

    open var customIndicatorBlock: (@MainActor @Sendable (UIView, Bool) -> SDWebImageIndicator?)?
  • 图片自定义句柄,setImageURL开始时调用

    Declaration

    Swift

    open var customBlock: (@MainActor @Sendable (UIView) -> Void)?

ImagePlugin