-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
macOS: the BottomSheet comes out from the top and cannot display its content #136
Comments
Hello @WalterZou, |
"If you drag it, it fixes itself": I don't know this specific problem, but I have several cases in my code, where the first rendering uses some defaults and later when you change something, it fixes itself. Workaround: you change some parameter (almost any parameter) .onAppear, that influences the layout. unrelated example:
|
Thank you for your reply @GerdC. However, I would have most likely found this issue at the time of writing this line, if it had existed at this time. Therefore im not sure what change caused it to break; in particular, what happened that this value is |
BottomSheetConfiguration.swift This is the bug. The default value of iPadFloatingSheet should be false. |
Hey @WalterZou think there was a misunderstanding. BottomSheet not on the bottomiPadI decided on purpose to use a floating sheet on iPad, because this the way Apple was doing it in Apple Maps: As you can see the Bottom sheet was floating in the top right; however Apple changed this behaviour (at least) as of iOS 17: As there have already have been many people in the past requesting the same behaviour like on iPhone, including myself, I added MacOn Mac, Apple doesn't use a BottomSheet, as this is a touch-focused Component. However, I decided to bring this component to MacOS anyway, to make it easier for cross platform developer. This doesn't meant that is is a good idea to use a BottomSheet on MacOS. I think it is currently not possible to make the BottomSheet on MacOS behave the same way like on iPhone (dragging from the bottom up), but im not sure (haven't used it on MacOS in a while and I don't have time right now to test it). Please just try if you can combine the ViewModifers specified in the README to get it work. Maybe MainContent not displaying
Please read the README for more information. What I was referring toIn your Screenshot, the title is not visible, because it is behind the
After @GerdC told me that it also fixes itself by getting the view to re-render, by updating any other view component, I was guessing that is had something to do with the view updates not firing:
At this time I was using a beta and during development I never encountered this issue (and I did extensive testing), so I guessed that this was just a Beta Bug. I did not had the time jet to try it again on the current Xcode version. ConclusionThe "bug" itself
is expected behaviour., but the title being beneath the As soon as I have time I will look into it. |
I am also facing same kind of issue but in iOS the sheets fly down from the top of the screen down to the bottom |
Describe the bug
In macOS, the BottomSheet comes out from the top and cannot display its content
Minimal reproduce-able code
Expected behavior
The BottomSheet should come out from the bottom, and the mainContent should be displayed
Screenshots
Target version
Additional context
Please provide additional information about the issue at hand
The text was updated successfully, but these errors were encountered: