Skip to content

Commit

Permalink
fixed the glitch when low quality image is about to replace with the …
Browse files Browse the repository at this point in the history
…higher one.
  • Loading branch information
michaelhenry committed Jan 29, 2020
1 parent 5f39e93 commit 2db4cb4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sources/ImageViewerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ class ImageViewerController:UIViewController, UIGestureRecognizerDelegate {
placeholderImage: placeholder ?? sourceView?.image,
options: [],
progress: nil) {[weak self] (img, err, type, url) in
self?.imageView.layoutIfNeeded()
}
DispatchQueue.main.async {
UIView.performWithoutAnimation {
self?.imageView.layoutIfNeeded()
}
}
}
default:
break
}
Expand Down

0 comments on commit 2db4cb4

Please sign in to comment.