Skip to content

Instantly share code, notes, and snippets.

@yogeshbh
Created May 28, 2021 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yogeshbh/cdb5b37785fe30028325e9974e40addd to your computer and use it in GitHub Desktop.
Save yogeshbh/cdb5b37785fe30028325e9974e40addd to your computer and use it in GitHub Desktop.
oncancel
override func prepareForReuse() {
super.prepareForReuse()
bookImage?.image = UIImage(named: "placeholder")
if let downloaderinProgress = runningDownloader {
let signpostID = OSSignpostID (log: SignpostLog.networking, object:downloaderinProgress )
downloaderinProgress.Cancel()
os_signpost(.end, log: SignpostLog.networking, name: "Background Image", signpostID: signpostID, "Status:%{public}@,Size:%llu", "Canceled", 0)
runningDownloader = nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment