-
Notifications
You must be signed in to change notification settings - Fork 57
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
how to use it inside inside a VStack loop #13
Comments
Because the BetterSafariView init the url on launch. There is no way to change it dynamically as far as I can tell. You need to extract the Safari View into subview, and it will work as expected. |
@legolasW thank you for the reply. I think I am missing something: the example at #1 would work with a list of links. In my sample code I sorted the first issue (using the README example in loop of articles will open 2 URLS different URLS in Safari if in lieu of passing a loop "in"
|
Umm... no, user does not need to click twice. By extract it to subview, I mean creating a new view that accepts url as variable. And then just passed the url to the subview. Use it like Define it like view Extract it to subview in SwiftUI is merely a way of organizing the code. It should not cause issues like "Having another view would solve this but that would require the user to have 2 clicks". |
|
Hello and thank you for your package :)
My problem is that inside a list of articles (VStack loop) if I use the current README example I get 2 instances/URLs (belonging to 2 different articles) opens every time I click a button.
I now tried:
but I get again 2 browsers opens at every click (just with the same link now). Thanks in advance for your help.
Originally posted by @gurugeek in #1 (comment)
The text was updated successfully, but these errors were encountered: