在Xcode中创建一个新的故事板,并将其作为主要的故事板(模拟器中的黑屏) [英] Creating a new storyboard in Xcode and making it the main one (black screen in simulator)

查看:217
本文介绍了在Xcode中创建一个新的故事板,并将其作为主要的故事板(模拟器中的黑屏)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我第一次启动该项目时,我不小心删除了该项目随附的原始Main.storyboard文件.现在,我需要所有必要的步骤来创建一个新的情节提要,并使它成为该项目的新主要情节提要.我只需要一个情节提要.当我在模拟器中运行我的应用程序时,我的整个应用程序只是一个黑屏.任何帮助将不胜感激.我正在用Swift编程.

I accidentally deleted my original Main.storyboard file that came with the project when I first began it. Now, I need all of the steps necessary to create a new storyboard and make it the new main storyboard for the project. I only need one storyboard. When I run my app in simulator my whole app is just a black screen. Any help would be greatly appreciated. I am programming in Swift.

推荐答案

您需要进行以下操作才能使其正常工作:

1..创建一个新文件

2..选择,命名并保存情节提要文件

2. Select, name and save the Storyboard file

3..在部署信息

4..将视图控制器拖到文件中并将其选择为初始视图控制器(查看右侧的检查器)

4. Drag a view controller into the file and select it as initial view controller (look at the inspector on the right)

这篇关于在Xcode中创建一个新的故事板,并将其作为主要的故事板(模拟器中的黑屏)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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