We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can I dismiss the view controller programmatically? Following minimal example does not work:
struct MyView: View { @State var showView = false var body: some View { let _ = print("current value: \(showView)") Button("Show it") { print("showing it") showView = true DispatchQueue.main.asyncAfter(deadline: .now() + 2) { print("hiding it") showView = false } } .safariView(isPresented: $showView) { SafariView(url: URL(string: "https://www.google.com")!) } } }
Log:
current value: false showing it current value: true hiding it current value: false
According to my debugging, view modifier does not detect that the value of the binding changed, this might be related: https://stackoverflow.com/questions/59299260/swiftui-binding-update-doesnt-refresh-view
The text was updated successfully, but these errors were encountered:
I am having the same issue. Were you able to find a solution?
Sorry, something went wrong.
I resorted to presenting SFSafariController and managing it myself for this particular case
No branches or pull requests
How can I dismiss the view controller programmatically? Following minimal example does not work:
Log:
According to my debugging, view modifier does not detect that the value of the binding changed, this might be related: https://stackoverflow.com/questions/59299260/swiftui-binding-update-doesnt-refresh-view
The text was updated successfully, but these errors were encountered: