Mijick / PopupView

Popups presentation made simple (SwiftUI)
MIT License
1.19k stars 50 forks source link

About pop-up window stacking problem #119

Open ByLiangCheng opened 2 months ago

ByLiangCheng commented 2 months ago

When I set the contentFillsEntireScreen of the BottomPopup popup to true, and then another BottomPopup pops up under this popup, the contentFillsEntireScreen of this popup is false, and the height is set to only occupy 50% of the screen, then the popup loaded for the first time will also be stacked to the back according to 50% of the height and become invisible, which is very strange

I expect that the first popup will not be stacked, but will remain unchanged like a normal window, and the second popup will pop up normally

I saw this issue discussed in #98. If I understand it correctly, can I switch to this branch patch-2.6.0 to implement it through zIndex?

If so, can you tell me how to use it? Because I see that the document has not been updated yet, I don’t quite understand how to use it

I would appreciate any help in resolving this issue.

FulcrumOne commented 2 months ago

Hey, could you please upload a video showing the problem? Thanks in advance.

ByLiangCheng commented 2 months ago

Hey, could you please upload a video showing the problem? Thanks in advance.

This is a simple example I made with your demo

https://github.com/Mijick/PopupView/assets/45414993/c8e422b9-e67f-4bdd-aeae-db902d8bcf9a

FulcrumOne commented 2 months ago

Hmmm, I see. Unfortunately this is an expected behaviour of this library (the previous popup is being "stacked" a.k.a. should be hidden behind the active one). As a temporary solution I can propose you to use our other library, NavigationView and declare that full-screen popup as a view that should be "pushed" with a "vertical slide" animation.

Next week we're going to start developing version 3.0.0 of this library, so I'll try to include your case here.

Sorry for the inconvenience and have a good day, Tomasz

ByLiangCheng commented 2 months ago

Ok thanks, I'll try to find out first to see