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

Commit

Permalink
Merge pull request #1 from teufelaudio/fixHomeGestureCollision
Browse files Browse the repository at this point in the history
Fix home gesture collision
  • Loading branch information
melle authored Apr 26, 2022
2 parents b924a83 + a38d105 commit 5da466a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ BottomSheet adheres to [Semantic Versioning](http://semver.org/).

### Changed

Fix half-opened bottom sheet when returning from background.

- 1.0.6

Removing List padding on examples.
Expand Down
5 changes: 4 additions & 1 deletion Sources/BottomSheet/BottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ public struct BottomSheet<Content: View>: View {
.gesture(
DragGesture()
.onChanged({ (value) in

// ignore the swipe-up gesture which could collide with the iOS-global "go to homescreen"-gesture
let isSwipeUp = value.startLocation.y > value.location.y
if isPresented == false, isSwipeUp { return }

let offsetY = value.translation.height
self.draggedOffset = offsetY

Expand Down

0 comments on commit 5da466a

Please sign in to comment.