Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand BottomSheet by pulling Pull Bar up #41

Open
AboulEinein opened this issue Sep 11, 2024 · 4 comments
Open

Expand BottomSheet by pulling Pull Bar up #41

AboulEinein opened this issue Sep 11, 2024 · 4 comments
Labels
question Further information is requested

Comments

@AboulEinein
Copy link

How can expand the ButtomSheet by pulling the Pull Bar up?

@mikhailmaslo mikhailmaslo added the question Further information is requested label Sep 11, 2024
@mikhailmaslo
Copy link
Collaborator

Hi!

Unfortunately, there is only two states: opened and completely closed

@AboulEinein
Copy link
Author

I would like to have another state fullscreen, that would be activated when the user pulls the view up, similar to when the user pulls the view down to close it.

How hard is it to add this functionality? I presume this would need to be handled in BottomSheetPresentationController, if you could point me to the place where it needs to be handled and any consideration I need to account for and I can try to open a PR with the change.

@mikhailmaslo
Copy link
Collaborator

I presume it should be indeed handled inside BottomSheetPresentationController

But I wouldn't say it's an easy task. At least when I have thought of how it might be implemented, I couldn't find a good answer

I suppose you want something similar to what AppleMaps has
Screenshot 2024-09-11 at 17 39 45

Probably you need to support "partially opened" state
Then, when user tries to scroll up, you need to transition to "fully opened" state

You can rule the size by this property

public override var frameOfPresentedViewInContainerView: CGRect {

But I don't know on the spot, how to make transitions between "partially opened" to "fully opened". Especially if you want interactiveness

@AboulEinein
Copy link
Author

The only difference between what AppleMaps and what I want to achieve is that I don't want to expand the BottomSheet when user scrolls inside it, it would fully open when you hold the pull bar and swipe up. Similar to the behavior in YouTube Chat drawer has

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants