WebViewImmersiveEnvironmentView
NewvisionOSpublic struct WebViewImmersiveEnvironmentView : ViewA SwiftUI view that renders a specific website-provided immersive environment.
Place this view in your app's Immersive Space hierarchy. Initialize it with the WebPage.ImmersiveEnvironment received from the presentation callback to render that specific environment.
Declaration
@MainActor public struct WebViewImmersiveEnvironmentView : View {
/// Creates an immersive environment view from a ``WebPage/ImmersiveEnvironment``.
@MainActor public init(_ environment: WebPage.ImmersiveEnvironment)
/// Creates an immersive environment view from a `WKImmersiveEnvironment`.
@MainActor public init(_ environment: WKImmersiveEnvironment)
/// The content and behavior of the view.
///
/// When you implement a custom view, you must implement a computed
/// `body` property to provide the content for your view. Return a view
/// that's composed of built-in views that SwiftUI provides, plus other
/// composite views that you've already defined:
///
/// struct MyView: View {
/// var body: some View {
/// Text("Hello, World!")
/// }
/// }
///
/// For more information about composing views and a view hierarchy,
/// see <doc:Declaring-a-Custom-View>.
@MainActor @preconcurrency public var body: some View { get }
/// The type of view representing the body of this view.
///
/// When you create a custom view, Swift infers this type from your
/// implementation of the required ``View/body-swift.property`` property.
@available(visionOS 27.0, *)
@available(macOS, unavailable, introduced: 9999)
@available(iOS, unavailable, introduced: 9999)
@available(tvOS, unavailable)
@available(watchOS, unavailable)
public typealias Body = some View
}