From 746fdeeeb2d37e9331a45240b54fe038acbfd838 Mon Sep 17 00:00:00 2001 From: Michael Henry Pantaleon Date: Wed, 30 Sep 2020 05:24:31 +1000 Subject: [PATCH 1/2] removed .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index b88b65087a209c59ba3e7ad0c8d804255bb3440d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKu};H441HHR6tQ$fV!4SC)ISJS7?>+DLz_~H8YK!K7_;$Td;lANfy6KHe6|Wz zVF83xWJ~sQF1C|&sK~c=VHM#V=N?FF))uM81}bGvEw30~^l(d$ve#N71b_;0!neO9tfo5UGNh zVXK%v9W-eKAj)rK68bVrNKQ1&3|mFsp#)7OYHF|%BWOC;qs3*0t)iwQ*zghT$-yR+ zke<%^F@+;!if)|&XJD0qExqhZ|3ChE{$EYsZa&I~+>-UywarPdjnp%$ oh{Uyu%M?1P6*E>^@h&w9*P}SZ%&=AD3dMf}5)E#gfj?#74OQMw-T(jq From b0e613a64eb4c0fe4b3a49907ec6a23466697127 Mon Sep 17 00:00:00 2001 From: Michael Henry Pantaleon Date: Wed, 30 Sep 2020 05:24:57 +1000 Subject: [PATCH 2/2] #106 --- ...eViewerTransitionPresentationManager.swift | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Sources/ImageViewerTransitionPresentationManager.swift b/Sources/ImageViewerTransitionPresentationManager.swift index 8f5d2f5..2248be0 100644 --- a/Sources/ImageViewerTransitionPresentationManager.swift +++ b/Sources/ImageViewerTransitionPresentationManager.swift @@ -77,26 +77,27 @@ extension ImageViewerTransitionPresentationAnimator: UIViewControllerAnimatedTra completed: @escaping((Bool) -> Void)) { guard - let transitionVC = controller as? ImageViewerTransitionViewControllerConvertible + let transitionVC = controller as? ImageViewerTransitionViewControllerConvertible, + let sourceView = transitionVC.sourceView else { return } + + sourceView.alpha = 0.0 + controller.view.alpha = 0.0 - let sourceView = transitionVC.sourceView + transitionView.addSubview(controller.view) + transitionVC.targetView?.alpha = 0.0 let dummyImageView = createDummyImageView( - frame: sourceView?.frameRelativeToWindow() ?? .zero, - image: sourceView?.image) + frame: sourceView.frameRelativeToWindow(), + image: sourceView.image) + dummyImageView.contentMode = .scaleAspectFit transitionView.addSubview(dummyImageView) - sourceView?.alpha = 0.0 - - transitionView.addSubview(controller.view) - controller.view.alpha = 0.0 - UIView.animate(withDuration: duration, animations: { - dummyImageView.contentMode = .scaleAspectFit dummyImageView.frame = UIScreen.main.bounds controller.view.alpha = 1.0 }) { finished in + transitionVC.targetView?.alpha = 1.0 dummyImageView.removeFromSuperview() completed(finished) }