Skip to content

Commit

Permalink
Cancelling an image request now nils out the active request receipt.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnoon committed Sep 28, 2015
1 parent 4ba1644 commit 62b58a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/UIImageView+AlamofireImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62b58a4

Please sign in to comment.