Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
684 views
in Technique[技术] by (71.8m points)

ios - No main.storyboard or ViewController.swift upon initialization of new project in Xcode?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In the latest Xcode, select Storyboard from the User Interface dropdown, enter image description here

Older Xcode

Unselect Use SwiftUI at the following step,

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...