我是新手,做的第一个应用就出现了下列问题:
(看图片附件1)
错误原因:
在stackoverflow中找到一点思路,虽然看的不是很懂,但是大致了解意思
It is caused by the Second
view controller in MainWindow.xib
having a class of UIViewController
instead of SecondView
. Changing to the correct class resolves the problem.
最后通过调试,发现运行根本就没进入到我定义的QuizViewController中,所以就更别谈显示QuizViewController.xib了(answerField在这里面)
错误地方:
(看图片附件2)
如果这里声明了你的第一个nib file的话,那么他首先就想要会显示QuizViewController .xib,但是该xib所对应的QuizViewController为nil,然后准备启动QuizViewController.xib,它肯定就会报错啊!所以在Quiz-info.plist删掉它,现在大功告成了!
扫描二维码关注公众号,回复:
575885 查看本文章