01-ViewController-9.swift 369 B

123456789
  1. // cell.sampleImageView.kf.setImage(with: url, options: [.processor(roundCorner)])
  2. cell.sampleImageView.kf.setImage(with: url, options: [.processor(roundCorner)]) { result in
  3. switch result {
  4. case .success(let imageResult):
  5. print("Image loaded from cache: \(imageResult.cacheType)")
  6. case .failure(let error):
  7. print("Error: \(error)")
  8. }
  9. }