1234567891011121314151617181920 |
- //
- // ImageView.swift
- // HCQuanfangtong
- //
- // Created by 崔毅 on 2022/7/16.
- // Copyright © 2022 Jyp. All rights reserved.
- //
- import Foundation
- extension UIImageView{
- func sd_setImage(url: URL?, placeHolderImage: UIImage? = nil, options: SDWebImageOptions = .retryFailed, completed: ((UIImage?)->Void)? = nil){
- self.sd_internalSetImage(with: url, placeholderImage: placeHolderImage, options: options, context: nil) { image, _, _, _ in
- self.image = image
- } progress: { _, _, _ in
- } completed: { image, _, _, _, _, _ in
- completed?(image)
- }
- }
- }
|