Mijick / PopupView

Popups presentation made simple (SwiftUI)
MIT License
1.08k stars 42 forks source link

iOS: Unable to display center popup when transitioning from a view presented with .fullScreenCover. #77

Closed RizwanaDesai closed 4 months ago

RizwanaDesai commented 4 months ago

Attempting to display a center popup from a view presented using .fullScreenCover results in the popup not being shown.

FulcrumOne commented 4 months ago

Hey @RizwanaDesai,

So this is the problem we're aware of - there's no option to show anything on top of Apple's sheets.

However, you can replace fulscreenCover with our implementation - check out popupFillsEntireScreen modifier.

itsthisjustin commented 4 months ago

" there's no option to show anything on top of Apple's sheets." - Can you give me some documentation for this? Previously we were displaying a custom view over top the page as the popup. image

FulcrumOne commented 4 months ago

hey @itsthisjustin,

What I meant is that it's impossible with a current implementation of the library. And here's why: We use the implementPopupView modifier to ensure that any popup will be built on top of any view. However, the Apple sheets create another "layer", that should be on the top of the current view. And this is where the problem lies - since our PopupView was declared earlier, it's impossible to place it on the top of the sheet.

FulcrumOne commented 4 months ago

Therefore I think it's better to replace fullscreenSheet with our BottomPopup + contentFillsEntireScreen modifier. On Monday / Tuesday, we're going to implement a change that overlay will be always a layer below CentrePopup (sorry, we are busy this week as we're working full-time for a company)

FulcrumOne commented 4 months ago

@RizwanaDesai, @itsthisjustin feature was implemented in the version 2.3.0

itsthisjustin commented 4 months ago

Awesome thanks!

Monkey-X-Byte commented 3 months ago

In version 2.3.0, I don’t see the contentFillsEntireScreen modifier?

FulcrumOne commented 3 months ago

Hey @Monkey-X-Byte,

Nah, it’s still there. However, it’s available only for BottomSheetPopup in the configurePopup method.

Let me know if it solved your problem and if not, I’m here to help you ;)

Monkey-X-Byte commented 3 months ago

Hey @Monkey-X-Byte,

Nah, it’s still there. However, it’s available only for BottomSheetPopup in the configurePopup method.

Let me know if it solved your problem and if not, I’m here to help you ;)

thanks