From 246d76edebc5f02cdb1ee3b86836fd702e7295f4 Mon Sep 17 00:00:00 2001 From: Artyom Vlasenko Date: Thu, 14 Mar 2024 19:03:02 +0700 Subject: [PATCH] Update PanModalPresentationDelegate.swift Fixed for iOS 17+ --- PanModal/Delegate/PanModalPresentationDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanModal/Delegate/PanModalPresentationDelegate.swift b/PanModal/Delegate/PanModalPresentationDelegate.swift index 24264b74..18d7759f 100644 --- a/PanModal/Delegate/PanModalPresentationDelegate.swift +++ b/PanModal/Delegate/PanModalPresentationDelegate.swift @@ -52,7 +52,7 @@ extension PanModalPresentationDelegate: UIViewControllerTransitioningDelegate { Changes in size class during presentation are handled via the adaptive presentation delegate */ public func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? { - let controller = PanModalPresentationController(presentedViewController: presented, presenting: presenting) + let controller = PanModalPresentationController(presentedViewController: presented, presenting: presenting ?? source) controller.delegate = self return controller }