SwiftUI Web View
A SwiftUI View that wraps WKWebView. This provides a more natural API when working in a SwiftUI context.
![WebView with a light color scheme. A SwiftUI Starter Kit Component.](/images/device-frames/WebView.png)
![WebView with a dark color scheme. A SwiftUI Starter Kit Component.](/images/device-frames/WebView_dark.png)
Usage
(
WebView: .constant(URL(string: "https://swiftstarterkits.com"))
url)
Features
- URL’s can be instantiated as bindings, allowing for dynamic re-loading of web pages from an external container.
- Supports light and dark device color schemes by default.
- Supports font scaling via Dynamic Type.
- Supports offline usage in SwiftUI Previews for easy debugging and testing.