johnpatrickmorgan / FlowStacks

FlowStacks allows you to hoist SwiftUI navigation and presentation state into a Coordinator
MIT License
857 stars 66 forks source link

Not able to achieve Translucent background for fullScreenCover or sheet #58

Closed Ajay-Jar closed 1 year ago

Ajay-Jar commented 1 year ago

In the below video I am getting grey background color when presenting screen2 but I am expecting translucent color. Please Help me You can find my code below.

TranslucentBackground.zip

https://github.com/johnpatrickmorgan/FlowStacks/assets/137762311/2d2d794f-18cd-4811-b962-52540bb432da

johnpatrickmorgan commented 1 year ago

HI @Ajay-Jar, thanks for raising this issue. This behaviour is defined by SwiftUI not FlowStacks - you'll see the same behaviour using vanilla navigation.

However, I can point you to a new api in iOS 16. The new presentationDetents modifier that can be used to achieve this effect, e.g. by adding .presentationDetents([.medium]) to Screen2.