UIViewControllerRepresentable
public protocol UIViewControllerRepresentable : Renderable, View
Use this protocol to create a custom View that represents a UIViewController.
-
Declaration
Swift
associatedtype UIViewControllerType : UIViewController -
Declaration
Swift
typealias UIContext = UIViewControllerRepresentableContext<Self> -
Declaration
Swift
associatedtype Coordinator = Void -
Creates a
UIViewControllerinstance to be presented.Declaration
Swift
func makeUIViewController(context: UIContext) -> UIViewControllerType -
Updates the presented
UIViewController(and coordinator) to the latest configuration.Declaration
Swift
func updateUIViewController(_ uiViewController: UIViewControllerType, context: UIContext) -
Creates a
Coordinatorinstance to coordinate with theUIViewController.Coordinatorcan be accessed viaContext.Declaration
Swift
func makeCoordinator() -> Coordinator
-
bodyExtension methodDeclaration
Swift
public var body: View { get } -
createView(context:Extension method) Declaration
Swift
public func createView(context: Context) -> UIView -
updateView(_:Extension methodcontext: ) Declaration
Swift
public func updateView(_ view: UIView, context: Context)
View on GitHub
UIViewControllerRepresentable Protocol Reference