本文介绍了如何在xcode中更改默认的ViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有这样的基于视图的项目
if i have a View-based project like this
dummyAppDelegate.h
dummyAppDelegate.m
dummyViewController.h
dummyViewController.m
dummyViewController.xib
现在我想要添加一个名为notdummyViewController的视图,并在启动时加载它以替换dummyViewController。我怎么能这样做?
now i want to add a view called "notdummyViewController" and make it load at start to replace dummyViewController. how could i do this?
推荐答案
在你的_info.plist中,你将拥有一个主nib文件基本名称,最有可能是MainWindow。打开这个xib并将View Controller的类更改为notdummyViewController。
In your _info.plist, you'll have a "Main nib file base name", most likely MainWindow. Open up this xib and change the class of the View Controller to notdummyViewController.
这篇关于如何在xcode中更改默认的ViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!