Skip to content

Commit

Permalink
Merge pull request #1 from stevelandeyasana/stevelandey/fix-dismiss-o…
Browse files Browse the repository at this point in the history
…n-pull-with-shoulddismiss

dismissOnPull obeys shouldDismiss
  • Loading branch information
messi authored Apr 19, 2023
2 parents 3dcebb2 + f43e37c commit aa973ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FittedSheets/SheetViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit aa973ae

Please sign in to comment.