UIHostingControllerWithContextFactory
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public struct UIHostingControllerWithContextFactory<ContentView> : Factory where ContentView : ContextInstantiatable
Builds UIHostingController
with ContentView
as a UIHostingController.rootView
using the constructor
provided with ContextInstantiatable
implementation.
-
Declaration
Swift
public typealias ViewController = UIHostingController<ContentView>
-
Declaration
Swift
public typealias Context = ContentView.Context
-
Constructor
Declaration
Swift
public init()
-
Declaration
Swift
public func build(with context: Context) throws -> UIHostingController<ContentView>