From 62b58a48dafd58b132b4432757e75a2807ed386c Mon Sep 17 00:00:00 2001 From: Christian Noon Date: Mon, 28 Sep 2015 08:15:28 -0700 Subject: [PATCH] Cancelling an image request now nils out the active request receipt. --- Source/UIImageView+AlamofireImage.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/UIImageView+AlamofireImage.swift b/Source/UIImageView+AlamofireImage.swift index fbbb88ae..d0d115b0 100644 --- a/Source/UIImageView+AlamofireImage.swift +++ b/Source/UIImageView+AlamofireImage.swift @@ -357,6 +357,8 @@ extension UIImageView { public func af_cancelImageRequest() { guard let activeRequestReceipt = af_activeRequestReceipt else { return } UIImageView.af_sharedImageDownloader.cancelRequestForRequestReceipt(activeRequestReceipt) + + af_activeRequestReceipt = nil } // MARK: - Private - URL Request Helper Methods