You started playing around with SwiftUI, and you want to present a Safari(WebView), you search in the documentation, and..., SwiftUI has no native way to display a WebView!
To use Safari (SFSafari) you need to create a custom UIViewControllerRepresentable
which is needed to use ViewControllers in SwiftUI.
This post contains, 3 sections,
- The code in steps
- The code (complete)
- Example on how to use.
Full post on: https://wesleydegroot.nl/blog/post/Safari-in-SwiftUI
Top comments (0)