Skip to content

Commit

Permalink
⭐️ Impl: UIViewController.closestSheetDropShadowView
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Sep 27, 2024
1 parent 8b87d15 commit 6d30cd2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ios/Temp/UIViewController+ModalHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 6d30cd2

Please sign in to comment.