From c82e78e5ce1ef588af9b76b69e94607111cc8c27 Mon Sep 17 00:00:00 2001 From: Zvonimir Taslak <52533549+ZvTa@users.noreply.github.com> Date: Fri, 1 Dec 2023 13:59:13 +0100 Subject: [PATCH 1/2] Fix ios 17.1+ issue --- PanModal/Controller/PanModalPresentationController.swift | 4 ++++ 1 file changed, 4 insertions(+) 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() From 2141a2c7eb8024452f7bc8f14e6813df3e9c4105 Mon Sep 17 00:00:00 2001 From: Zvonimir Taslak <52533549+ZvTa@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:00:56 +0200 Subject: [PATCH 2/2] Update PanModalPresentationAnimator.swift Remove animations --- PanModal/Animator/PanModalPresentationAnimator.swift | 6 ------ 1 file changed, 6 deletions(-) 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