I see a lot online about how to navigate to a UIViewController from a SwiftUI view, but not much on how to navigate from a UIViewController to a SwiftUI view. Anyone know how to do this?
I see a lot online about how to navigate to a UIViewController from a SwiftUI view, but not much on how to navigate from a UIViewController to a SwiftUI view. Anyone know how to do this?
You can do this as you do with UIViewcontroller, But SwiftUIView is represented with UIHostingController in UIKit
import SwiftUI
...
let hostingController = UIHostingController(rootView: YourSwiftUIView())
navigationController?.pushViewController(hostingController, animated: true)