UIHostingController

extension UIHostingController where Content == AnyView

Available where Content == AnyView

  • 快速创建视图上下文控制器

    Declaration

    Swift

    @MainActor
    public static func contextController<T>(@ViewBuilder content: () -> T) -> UIHostingController<AnyView> where T : View