[英]How to change Root View to Navigation Controller?
I created a Single View application with a view controller that allows you to enter homework assignment data. 我创建了带有视图控制器的Single View应用程序,该控制器允许您输入作业分配数据。 I now am trying to add onto this app by creating a navigation controller. 我现在正尝试通过创建导航控制器添加到此应用程序中。 I want the First Screen to be a Table View, that switches to the homework assignment screen when you click the "Add" arrow. 我希望“第一个屏幕”是一个表视图,当您单击“添加”箭头时,它将切换到作业分配屏幕。
I've created the Navigation controller onto the Table view, and connected the Add button to the Assignment View Controller, but when I start the app, it still opens up to the Homework Assignment screen. 我已经在Table视图上创建了Navigation控制器,并将Add按钮连接到Assignment View Controller,但是当我启动该应用程序时,它仍然会打开到Homework Assignment屏幕。
Can anyone provide a simple way to change the startup screen to my TableView? 谁能提供一种简单的方法来将启动屏幕更改为我的TableView?
EDIT: I am using storyboard. 编辑:我正在使用情节提要。 I havent added/edited any new code anywhere for the Table view/ Navigation controller/AppDelegate, I just dragged and connected with storyBoard, I just need to app to startup on the table View instead of the Homework assignment View Controller. 我还没有在任何地方为表视图/导航控制器/ AppDelegate添加/编辑任何新代码,我只是拖动并与StoryBoard连接,我只需要在表View而不是作业分配View Controller上启动应用即可启动。
In your storyboard, select the view controller that should be the initial one. 在情节提要中,选择应为初始控制器的视图控制器。 Go to the utilities view (on the right). 转到实用程序视图(在右侧)。 Open the attributes inspector. 打开属性检查器。 Tick the Is Initial View Controller
checkbox. 勾选Is Initial View Controller
复选框。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.