找不到XCode 4.2 MainStoryBoard [英] XCode 4.2 MainStoryBoard Not Found

查看:674
本文介绍了找不到XCode 4.2 MainStoryBoard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我对MainStoryboard.storyboard进行更改时,这些更改都没有进入我的iOS设备,即使它已构建。我尝试从设备中删除应用程序的所有数据并重新启动所有内容,但现在当我在iPhone上构建并运行代码时,我收到以下错误:

When I make changes to the MainStoryboard.storyboard none of these changes make it to my iOS device even though it builds. I tried deleting all data for the application from the device and restarting everything but now when I build and run the code on the iPhone I get the following error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard' in bundle NSBundle </var/mobile/Applications/BE0CBEE9-1E95-443A-97CF-53CCD66A2D0C/WalkBack.app> (loaded)'

据我所知,我的plist文件中包含适当的信息名称故事板。

From what I can tell, my plist file has the appropriate information for the name of the storyboard.

任何想法有什么问题,或者我该如何解决?当这个问题发生时,.xcodeproj文件开始在XCode 3中打开。这是否弄乱了一些设置?我非常失落。

Any ideas what is wrong, or how can I fix it? Right when this problem happened the .xcodeproj file started opening in XCode 3. Did this mess up some settings? I'm terribly lost.

推荐答案

我看到这种情况与我的学生一起发生了几次,今天我也遇到过这件事。似乎可以解决这个问题:

I've seen this happen a handful of times with the files with my students, and today I had it happen to me as well. What seems to fix it for me:


  1. 右键单击Project Navigator中的MainStoryboard.storyboard。

  2. 选择删除,然后单击 仅删除参考

  3. 右键单击InfoPlist.strings并选择Show In Finder 。 (这只是我在查找器中打开包含故事板的文件夹的懒惰方式。)

  4. 将MainStoryboard.storyboard从Finder拖回项目。

  1. Right-click on your MainStoryboard.storyboard in the Project Navigator.
  2. Select Delete and click Remove References Only.
  3. Right click on InfoPlist.strings and select "Show In Finder". (This is just my lazy way to open the folder containing the storyboard in finder.)
  4. Drag the MainStoryboard.storyboard from Finder back into the project.

我怀疑是通过向项目添加文件或对故事板进行某些编辑来触发某个错误。它导致本地化文件不被复制到包中(我认为)。删除故事板并将其重新添加到项目似乎可以解决问题。

My suspicion is that there is a bug somewhere triggered by adding files to the project or certain edits to the storyboard. It causes the localized files to not be copied into the bundle (I think). Removing the storyboard and re-adding it to the project seems to fix the hiccup.

这篇关于找不到XCode 4.2 MainStoryBoard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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