From 6d30cd2621ed02099249f809b10069c020b6d1b6 Mon Sep 17 00:00:00 2001 From: Dominic Go Date: Fri, 27 Sep 2024 09:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=EF=B8=8F=20Impl:=20`UIViewController.?= =?UTF-8?q?closestSheetDropShadowView`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Temp/UIViewController+ModalHelpers.swift | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ios/Temp/UIViewController+ModalHelpers.swift b/ios/Temp/UIViewController+ModalHelpers.swift index 9fdc3a99..328ddfee 100644 --- a/ios/Temp/UIViewController+ModalHelpers.swift +++ b/ios/Temp/UIViewController+ModalHelpers.swift @@ -49,18 +49,19 @@ extension UIViewController { return match; }; - public var closestSheetPanGestureViaClimbingParentView: UIPanGestureRecognizer? { + public var closestSheetDropShadowView: UIView? { guard let targetClassName = PrivateSymbolString.classNameForDropShadowView.decodedString else { return nil; }; - let matchingAncestorView = self.view.recursivelyFindParentView { - $0.className == targetClassName - && $0.gestureRecognizers?.count ?? 0 > 0; + return self.view.recursivelyFindParentView { + $0.className == targetClassName; }; - - guard let matchingAncestorView = matchingAncestorView, - let gestureRecognizers = matchingAncestorView.gestureRecognizers + }; + + public var closestSheetPanGestureViaClimbingParentView: UIPanGestureRecognizer? { + guard let sheetDropShadowView = self.closestSheetDropShadowView, + let gestureRecognizers = sheetDropShadowView.gestureRecognizers else { return nil; };