SwiftUI View to UIKit UIView

PHOTO EMBED

Wed Jun 01 2022 05:05:49 GMT+0000 (Coordinated Universal Time)

Saved by @tonystark #swift

struct ContentView : View {
    var body: some View {
        VStack {
            Text("Test")
            Text("Test2")

        }
    }
}

var child = UIHostingController(rootView: ContentView())
content_copyCOPY

https://stackoverflow.com/questions/56631892/addsubview-swiftui-view-to-uikit-uiview-in-swift