danielsaidi / BottomSheet

BottomSheet lets you add custom bottom sheets to your SwiftUI apps.
MIT License
189 stars 12 forks source link

Allow sheet to be dragged above maxHeight, then snap back to maxHeight on drop #4

Closed digitalheir closed 2 years ago

digitalheir commented 3 years ago

I think the component would feel a little more playful if we could drag the expanded bottom sheet to above its maxHeight, and on releasing the finger would use the spring animation to move back.

What do you think?

Kind of like this, except that it doesn't snap to the 'full screen' height:

danielsaidi commented 3 years ago

100% agree! 👍

danielsaidi commented 2 years ago

I think this would be a pretty easy fix. I'll look at it when I have time.

danielsaidi commented 2 years ago

@digitalheir I am looking at this now and it's not an easy fix as I thought that is would be.

The sheet has a max height depending on it's configuration, and dragging the sheet beyond the draggable limit doesn't resize the sheet but rather just pans it so that the bottom edge shows.

I'll have to investigate if I can expand the height once the drag offset it taller than the max offset, but it's a pretty tricky fix.

danielsaidi commented 2 years ago

Closing this since the library has been deprecated.