Created
February 14, 2022 16:52
This file contains hidden or 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