在Xcode中初始化新项目时没有main.storyboard或ViewController.swift吗? [英] No main.storyboard or ViewController.swift upon initialization of new project in Xcode?

查看:1344
本文介绍了在Xcode中初始化新项目时没有main.storyboard或ViewController.swift吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚得到Xcode,并且尝试遵循在线教程,但是在每个单独的教程中,当制作一个新项目(单个活动)应用程序时,该项目附带2个文件,而这些文件我在默认情况下根本没有!创建项目时,我不知道如何默认创建main.storyboard或ViewController.swift文件.

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.

我仅有的文件是AppDelegate.swift,SceneDelegate.swift和ContentView.swift.我也有Assets.xcassets,LaunchScreen.storyboard,Info.plist,Preview Content目录和Products目录.

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?

我尝试重新安装,并且制作了多个新项目-每次它们都缺少这2个关键文件,因此将不胜感激.

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

推荐答案

最新的Xcode 中,从用户界面下拉列表中选择Storyboard

In the latest Xcode, select Storyboard from the User Interface dropdown,

较旧的Xcode

在后续步骤中取消选择Use SwiftUI

Unselect Use SwiftUI at the following step,

这篇关于在Xcode中初始化新项目时没有main.storyboard或ViewController.swift吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆