CLASS

HaapiPreviewThemeHandle

Contents

@_spi(HaapiPreview) public final class HaapiPreviewThemeHandle

Type-erased access to a loaded theme for preview tooling.

Wraps the internal ThemeRegistry without ever exposing it: style access goes through the public view-controller style types and the public UIStylableThemeDelegate protocol. Marked @_spi(HaapiPreview) so it is absent from the public interface, autocomplete, and generated reference docs.

Properties

commonStyle

public var commonStyle: HaapiUIViewControllerStyle

The common style shared across all view controllers. Opaque outside the framework — its members are internal; external callers pass it to public VC initializers.

themeDelegate

public var themeDelegate: any UIStylableThemeDelegate

The theme delegate to assign to view controllers for dynamic theming.

Methods

style(stylableType:)

public func style<T: UIStyle>(stylableType: any UIStylable.Type) throws -> T

Resolves the style for a stylable view controller type (e.g. FormViewController.self).