Using both launchscreen.storyboard and main.storyboard

Hi! Im new to coding and i would like some help.

Im trying to build an recepies app with SwiftUI. I want a launchscreen so i made one with launchscreen.storyboard but after the launch screen i want the app to direct to the storyboard and not the default start that’s there with the, ”Hello, World!” So how should i do to make this happen? Is it even possible? Or do i have to code it all myself?

I don’t wanna use the storyboard interface since i really wanna code aswell and build it more stable. Thanks for the feedback! Have a great day! :slight_smile:

@gustaf

In a SwiftUI application you don’t have a launchscreen.storyboard by default.

If you want a launchscreen.storyboard and a main.storyboard then you need to create a Storyboard based application. When you create a New Xcode project you can change the Interface option from SwiftUI to Storyboard. That assumes that you intend to create an App using the UIKit framework rather than SwiftUI.

1 Like

Thanks! I know this but isn’t swiftui better? I haven’t really understood the differences more tham that storyboard helps you with the code. Can one get a decent app from just using .storyboard?

It’s the other way around.

SwiftUI is not as capable as UIKit (Storyboard) at this stage. What I mean is that you still need to incorporate some UIKit elements into a SwiftUI App to gain the same level of functionality that a pure UIKit (storyboard) App would give you. That does not mean that you introduce a storyboard as such, rather you include UIKit elements by using a UIViewRepresentable protocol and a Coordinator protocol as an interface between the two frameworks.

So in essence a storyboard application will give you a better result but that gap between the two frameworks is rapidly reducing. I would expect that at WWDC21 we will see SwiftUI 3 (the 3rd iteration) released with significant improvements.

Oh, thanks!