You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the App both buttons open the URL from the first Button in the View.
E.g.: First Button URL: google.com, Second Button URL: amazon.com -> Opens google.com from both Buttons First Button URL: amazon.com, Second Button URL: google.com -> Opens amazon.com from both Buttons
Is this expected behavior? Am I doing something wrong?
Thanks for your help in advance :)
The text was updated successfully, but these errors were encountered:
I found a solution. The problems lies in the way BetterSafariView init the url. Once the view is visible, the url is initialized and there is no way to change it. As a result, it can only point to one url in a single view.
The solution is to put it into a separate view. Thus, you can create as many url points to different website as you wish.
You can create an @Binding value for your URL and change it prior to calling showSafari.toggle(). This should cause SwiftUI to redraw the view with your updated URL.
I have 2 Buttons in the same View. Each of them should open a BSV with given URLs slnURL[0] and slnURL[1]:
When running the App both buttons open the URL from the first Button in the View.
E.g.:
First Button URL: google.com, Second Button URL: amazon.com -> Opens google.com from both Buttons
First Button URL: amazon.com, Second Button URL: google.com -> Opens amazon.com from both Buttons
Is this expected behavior? Am I doing something wrong?
Thanks for your help in advance :)
The text was updated successfully, but these errors were encountered: