webViewContentBackground(_:)
Specifies the visibility of the webpage’s natural background color within this view.
Declaration
nonisolated func webViewContentBackground(_ visibility: Visibility) -> some View
Parameters
- visibility:
The visibility to use for the background.
Return Value
A view with the specified content background visibility.
Discussion
By default, WebViews are opaque, and use the page’s natural background color as their background color. Use this modifier if you would like to not use this behavior and instead provide a custom background using SwiftUI.