No main.storyboard or ViewController.swift upon in

2020-02-13 08:30发布

问题:

I just got Xcode and I am trying to follow an online tutorial but in every single tutorial, when a new project is made (a single activity) app, the project comes with 2 files that I simply don't have by default! I can't figure out how to make a main.storyboard or ViewController.swift file by default upon creating a project.

The only files I have are AppDelegate.swift, SceneDelegate.swift, and ContentView.swift. I also have Assets.xcassets, LaunchScreen.storyboard, Info.plist, Preview Content directory, and Products directory.

Is this part of a new update or something? Or is there some way I can get those 2 files to create upon initialization?

I tried reinstalling, and have made multiple new projects - each time they lack those 2 crucial files, so any help would be appreciated.

回答1:

Uncheck Use SwiftUI at the following step,



回答2:

On latest Xcode release you should change in the dropdown menu from "Swift UI" to "Storyboard"