Skip to content

Modifiers & Hosting

Apply SwiftUiModifier values in declaration order. Convenience builders such as style, control_size, and disabled append those modifiers.

#Modifiers

Button style, border shape, control size, label style, tint, and disabled state are supported. Apply them on the descriptor before sync.

#Liquid Glass

SwiftUiButton::new(1)
    .label("Continue")
    .style(SwiftUiButtonStyle::Glass)
    .control_size(SwiftUiControlSize::Large)

macOS draws glass where it is available.

#Reverse hosting

SwiftUiQuickGuiHost::pending(1)

Embed a QuickGUI subtree with SwiftUiQuickGuiHost and MacSwiftUiHost::set_embedded_view.

#SwiftUI popover

SwiftUiPopover has trigger and content element lists. A SwiftUiQuickGuiHost inside that content hosts ordinary QuickGUI children.

#Lifetime

Dropping MacSwiftUiHost releases the native view. A presented panel closes with its owner.