diff --git a/src/private/MDMViewControllerTransitionCoordinator.m b/src/private/MDMViewControllerTransitionCoordinator.m index d6e1d06..ed77563 100644 --- a/src/private/MDMViewControllerTransitionCoordinator.m +++ b/src/private/MDMViewControllerTransitionCoordinator.m @@ -336,17 +336,17 @@ - (void)initiateTransition { if (!CGRectIsEmpty(finalFrame)) { toView.frame = finalFrame; } + } - if (toView.superview == nil) { - switch (_direction) { - case MDMTransitionDirectionForward: - [_transitionContext.containerView addSubview:toView]; - break; + if (toView.superview == nil) { + switch (_direction) { + case MDMTransitionDirectionForward: + [_transitionContext.containerView addSubview:toView]; + break; - case MDMTransitionDirectionBackward: - [_transitionContext.containerView insertSubview:toView atIndex:0]; - break; - } + case MDMTransitionDirectionBackward: + [_transitionContext.containerView insertSubview:toView atIndex:0]; + break; } }