xcodeswiftuistoryboard

iOS: SwiftUI compatible with Storyboards


Can we develop an iOS application with both storyboards and SwiftUI. is there anything like bridging available like we do bridging codes from objective c to swift and vice versa.


Solution

  • Interface Builder supports adding a UIHostingController to a storyboard, which is the UIKit controller that can have a SwiftUI subview, but there’s no integration beyond that. You’d have to write your own methods and classes to pass data and actions between them.