diff --git a/Tusker/Screens/Large Image/LargeImageViewController.xib b/Tusker/Screens/Large Image/LargeImageViewController.xib index 60b8f120..023aa143 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.xib +++ b/Tusker/Screens/Large Image/LargeImageViewController.xib @@ -1,10 +1,10 @@ - + - + diff --git a/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift b/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift index 8378a188..83f90b73 100644 --- a/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift +++ b/Tusker/Screens/Large Image/Transitions/LargeImageExpandAnimationController.swift @@ -51,6 +51,13 @@ class LargeImageExpandAnimationController: NSObject, UIViewControllerAnimatedTra imageView.layer.cornerRadius = 0 blackView.alpha = 1 }, completion: { _ in + // This shouldn't be necessary. I believe it's a workaround for using a XIB + // for the large image VC. Without this, the final frame of the large image VC + // is not set to the propper rect (it uses the frame of the preview device + // in the XIB). When using a storyboard, the final frame is automatically set + // (or UIKit does layout differently when loading the view) and this is not necessary. + toVC.view.frame = finalVCFrame + toVC.view.isHidden = false fromVC.view.isHidden = false blackView.removeFromSuperview()