框架集成 - UIKit 中的 SwiftUI
UIHostingController
代表 SwiftUI 视图的 UIViewController
。
let vc = UIHostingController(rootView: Text("Hello World"))
let vc = UIHostingController(rootView: ContentView())
代表 SwiftUI 视图的 UIViewController
。
let vc = UIHostingController(rootView: Text("Hello World"))
let vc = UIHostingController(rootView: ContentView())