Skip to content

Commit

Permalink
#127 disable animation when about to load new image from url.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhenry committed Apr 19, 2022
1 parent b7b8416 commit 840b873
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/ImageViewer_swift/ImageLoader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ public struct URLSessionImageLoader: ImageLoader {
}

DispatchQueue.main.async {
UIView.setAnimationsEnabled(false)
imageView.image = image
completion(image)
UIView.setAnimationsEnabled(true)
}
}
}
Expand Down

0 comments on commit 840b873

Please sign in to comment.