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

View opens twice #15

Open
1234igor opened this issue Feb 11, 2021 · 3 comments
Open

View opens twice #15

1234igor opened this issue Feb 11, 2021 · 3 comments

Comments

@1234igor
Copy link

Hi! Just pasted example code into my project:

`...
.onTapGesture() {

                        self.presentingSafariView = true

                    }.safariView(isPresented: $presentingSafariView) {
                        SafariView(
                            url: URL(string: "https://google.com")!,
                            configuration: SafariView.Configuration(
                                entersReaderIfAvailable: false,
                                barCollapsingEnabled: true
                            )
                        )
                        .preferredBarAccentColor(.clear)
                        .preferredControlAccentColor(.accentColor)
                        .dismissButtonStyle(.done)
                    }`

When I tap, the Safari View opens two times, and I need to close two Safaris to get back into my app. Any ideas what could be causing this?

@1234igor
Copy link
Author

Thank you, I've found solution in another thread.

Moving my row code into a separate view with its own url variable helped.

@ChopsKingsland
Copy link

Can you give more information, please, as I am having the same issue?

@litt1e-p
Copy link

append .safariView( to wrapper view will do helped

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

3 participants