diff --git a/ios/Temp/UIViewController+ModalHelpers.swift b/ios/Temp/UIViewController+ModalHelpers.swift index 4d1e740..9a2a9f2 100644 --- a/ios/Temp/UIViewController+ModalHelpers.swift +++ b/ios/Temp/UIViewController+ModalHelpers.swift @@ -49,7 +49,7 @@ extension UIViewController { return match; }; - public var closestSheetDropShadowView: UIView? { + public var closestSheetDropShadowViewViaClimbingAncestorViews: UIView? { guard let targetClassName = PrivateSymbolString.classNameForDropShadowView.decodedString else { return nil; }; @@ -59,6 +59,28 @@ extension UIViewController { }; }; + public var closestSheetDropShadowViewViaClimbingNextResponders: UIView? { + guard let targetClassName = PrivateSymbolString.classNameForDropShadowView.decodedString else { + return nil; + }; + + let match = self.recursivelyFindNextResponder { + $0.className == targetClassName; + }; + + return match as? UIView; + }; + + public var closestSheetDropShadowViewViaPresentationController: UIView? { + self.presentationController?.presentedView; + }; + + public var closestSheetDropShadowView: UIView? { + self.closestSheetDropShadowViewViaPresentationController + ?? self.closestSheetDropShadowViewViaClimbingAncestorViews + ?? self.closestSheetDropShadowViewViaClimbingNextResponders; + }; + public var closestSheetPanGestureViaClimbingParentView: UIPanGestureRecognizer? { guard let sheetDropShadowView = self.closestSheetDropShadowView, let gestureRecognizers = sheetDropShadowView.gestureRecognizers