Call completions immediately if the previous WebViewController was deallocated because the iPad was rotated. Issue #1757
This commit is contained in:
parent
df3c78b1c6
commit
a0f429448f
|
@ -93,12 +93,17 @@ class ImageTransition: NSObject, UIViewControllerAnimatedTransitioning {
|
|||
animations: {
|
||||
imageView.frame = self.originFrame
|
||||
}, completion: { _ in
|
||||
self.webViewController?.showClickedImage() {
|
||||
if let controller = self.webViewController {
|
||||
controller.showClickedImage() {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
imageView.removeFromSuperview()
|
||||
transitionContext.completeTransition(true)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
imageView.removeFromSuperview()
|
||||
transitionContext.completeTransition(true)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue