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

In iOS 15, Unable to dismiss presenter correctly #9

Open
SamLee1990 opened this issue Apr 11, 2024 · 0 comments
Open

In iOS 15, Unable to dismiss presenter correctly #9

SamLee1990 opened this issue Apr 11, 2024 · 0 comments

Comments

@SamLee1990
Copy link

In iOS 15,
after fullScreenCover presented, and after nativePartialSheet presented,
cannot return to before fullScreenCover presented by changing the isPresented parameter of fullScreenCover.

Here is how I write it

@State private var isPressentingScanner = false

.fullScreenCover(isPresented: $isPressentingScanner) {
        ScannerView(isPressentingScanner: $isPressentingScanner)
}
struct ScannerView: View {
      @Binding var isPressentingScanner :Bool
      @State var isPressentingBottom = true
      
      VStack {
             Button(action: {
                    isPressentingScanner = false
            }, label: {
                Image(systemName: "xmark")
            })
      }
      .nativePartialSheet(isPresented: $isPressentingBottom) {
               /// some view
      }
      .presentationDetents([.small, .medium, .large ], selection: $detent)
      .cornerRadius(32)
      .largestUndimmedDetent(.medium)
}

Can't dismiss ScannerView
But iOS 17 works

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

No branches or pull requests

1 participant