Skip to content

QuickGUIHostView

Reverse-hosts one ordinary QuickGUI subtree inside a SwiftUI hierarchy.

#Import

Import ui from github.com/egoist/quickgui/go/ui.

import (
	"github.com/egoist/quickgui/go/ui"
)

#Usage

func SwiftUiQuickguiHostViewExample() *native.Node {
	return ui.SwiftUI.Host(
		ui.SwiftUIHostProps{MatchContents: true},
		func() *native.Node {
			return ui.SwiftUI.QuickGUIHostView(
				ui.SwiftUIQuickGUIHostViewProps{Width: 320, Height: 180},
				func() *ui.Element {
					return ui.View().Child(
						"QuickGUI inside SwiftUI",
					).Width("100%").Height("100%").Padding(16)
				},
			)
		},
	)
}

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

SwiftUI.QuickGUIHostView

View source
ui.SwiftUI.QuickGUIHostView(props SwiftUIQuickGUIHostViewProps, children ...any) *native.Node

QuickGUIHostView is an independently owned QuickGUI renderer inside a SwiftUI hierarchy.

TestIDany—

Stable identifier for native automation and tests.

any
View source
Modifiersany—

Ordered SwiftUI view modifiers applied to the hosted control.

any
View source
Reffunc(*native.Node)—

Receives the retained native node after construction. Keep imperative work in event or lifecycle callbacks.

func(*native.Node)
View source
ChildrenComponent—

Content mounted inside the component. Compound child callbacks run after the parent context exists.

Component
View source
Widthany—

Declared logical width.

any
View source
Heightany—

Declared logical height.

any
View source
MatchContentsany—

Uses the hosted subtree’s intrinsic width, height, or both.

any
View source
Backgroundany—

Clear color for the reverse-hosted QuickGUI WGPU surface.

any
View source