Skip to content

Commit 840b873

Browse files
committed
#127 disable animation when about to load new image from url.
1 parent b7b8416 commit 840b873

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/ImageViewer_swift/ImageLoader.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ public struct URLSessionImageLoader: ImageLoader {
2222
}
2323

2424
DispatchQueue.main.async {
25+
UIView.setAnimationsEnabled(false)
2526
imageView.image = image
2627
completion(image)
28+
UIView.setAnimationsEnabled(true)
2729
}
2830
}
2931
}

0 commit comments

Comments
 (0)