Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Partial sheet panning fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedinicolatt committed May 29, 2024
1 parent 51cb04b commit db9eb64
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ open class PartialSheetPresentationController: UIPresentationController {
partialSheetDelegate?.partialSheetPresentationControllerDidDismissSheet?(self)

NotificationCenter.default.post(name: PartialSheetPresentationController.partialSheetDidDismissNotification, object: nil)
} else {
// This is a wildly hacky solution to the problem discussed here: https://thumbtack.slack.com/archives/C04L74B6M/p1697811811558819
// "If you drag the sheet at all and then let go, the CTAs [and any other gestures] become unresponsive"
// Solution provided here: https://stackoverflow.com/a/74320743
// TODO: (mdinicola) Check to see if this is solved in future iOS versions
presentedViewController.view.bounds.origin.y = .leastNonzeroMagnitude
presentedViewController.view.bounds.origin.y = .zero
}
}

Expand Down

0 comments on commit db9eb64

Please sign in to comment.