diff --git a/PanModal/Animator/PanModalPresentationAnimator.swift b/PanModal/Animator/PanModalPresentationAnimator.swift index f7fbdd0e..efcda123 100644 --- a/PanModal/Animator/PanModalPresentationAnimator.swift +++ b/PanModal/Animator/PanModalPresentationAnimator.swift @@ -70,9 +70,6 @@ public class PanModalPresentationAnimator: NSObject { else { return } let presentable = panModalLayoutType(from: transitionContext) - - // Calls viewWillAppear and viewWillDisappear - fromVC.beginAppearanceTransition(false, animated: true) // Presents the view in shortForm position, initially let yPos: CGFloat = presentable?.shortFormYPos ?? 0.0 @@ -108,9 +105,6 @@ public class PanModalPresentationAnimator: NSObject { let toVC = transitionContext.viewController(forKey: .to), let fromVC = transitionContext.viewController(forKey: .from) else { return } - - // Calls viewWillAppear and viewWillDisappear - toVC.beginAppearanceTransition(true, animated: true) let presentable = panModalLayoutType(from: transitionContext) let panView: UIView = transitionContext.containerView.panContainerView ?? fromVC.view diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 11fb2a6e..ad4a57a2 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -177,6 +177,10 @@ open class PanModalPresentationController: UIPresentationController { guard let containerView = containerView else { return } + if self.panContainerView.frame == .zero { + self.adjustPresentedViewFrame() + } + layoutBackgroundView(in: containerView) layoutPresentedView(in: containerView) configureScrollViewInsets()