From f43e37cb7b57356e5964981f039547de298a42b0 Mon Sep 17 00:00:00 2001 From: Steve Landey Date: Wed, 21 Dec 2022 15:15:31 -0800 Subject: [PATCH] dismissOnPull obeys shouldDismiss --- FittedSheets/SheetViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FittedSheets/SheetViewController.swift b/FittedSheets/SheetViewController.swift index e7b6b3e..d833c2f 100644 --- a/FittedSheets/SheetViewController.swift +++ b/FittedSheets/SheetViewController.swift @@ -427,7 +427,7 @@ public class SheetViewController: UIViewController { let animationDuration = TimeInterval(abs(velocity*0.0002) + 0.2) - guard finalHeight > 0 || !self.dismissOnPull else { + guard finalHeight > 0 || !(self.dismissOnPull && self.shouldDismiss?(self) ?? true) else { // Dismiss UIView.animate( withDuration: animationDuration,