ViewControllerWrapper
public struct ViewControllerWrapper<T> : UIViewControllerRepresentable where T : UIViewController
通用UIViewController包装器
-
指定makeUIViewController闭包初始化
Declaration
Swift
public init(_ maker: (() -> T)? = nil)
-
指定updateUIViewController闭包初始化
Declaration
Swift
public init(updater: @escaping (T) -> Void)
-
指定makeUIViewController闭包和updateUIViewController闭包初始化
Declaration
Swift
public init(_ maker: @escaping () -> T, updater: @escaping (T) -> Void)
-
设置makeUIViewController闭包
Declaration
Swift
public func maker(_ maker: @escaping () -> T) -> ViewControllerWrapper<T>
-
设置updateUIViewController闭包
Declaration
Swift
public func updater(_ updater: @escaping (T) -> Void) -> ViewControllerWrapper<T>
-
Declaration
Swift
public typealias UIViewControllerType = T
-
Declaration
Swift
public func makeUIViewController(context: Context) -> T
-
Declaration
Swift
public func updateUIViewController(_ uiViewController: T, context: Context)