Created
February 14, 2022 16:52
-
-
Save bocato/021133c7668d78efda41e69f169ad11b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ToSwiftUIView<UIKitView: UIView>: UIViewRepresentable { | |
typealias UIViewType = UIKitView | |
let uikitView: () -> UIKitView | |
func makeUIView(context: Context) -> UIKitView { | |
uikitView() | |
} | |
func updateUIView(_ uiView: UIKitView, context: Context) {} | |
} | |
struct ToSwiftUIController: UIViewControllerRepresentable { | |
let viewController: () -> UIViewController | |
func makeUIViewController(context: Context) -> UIViewController { | |
self.viewController() | |
} | |
func updateUIViewController(_ uiViewController: UIViewController, context: Context) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment