UsamaDev

You can achieve this by simply following these steps…

Open and create simple Xcode project.

  1. Create a button in viewController presented in mainStoryBoard and import SwiftUI inside ViewController Class.
  2. Add a hostingViewController in mainStoryboard and Drag a Segue (show Segue) from button to hostingViewController.Add segueAction form segue presented in mainStoryBoard to viewController.
Control Drag Segue form button to HostingController

3. Add SwiftUI file in your project by clicking Cmd+N and Creating SwiftUI file.

--

--

UsamaDev

UsamaDev

iOS Developer🧑‍💻.Love to Code.♥️Life has not ctrl+ Z , So learn from mistakes and move on🥰