如何重命名NIB文件(或xib,以便重命名nib)

时间:2011-03-11 17:58:11

标签: objective-c xcode4

这是我在下面运行的结果。几天前,我重命名了一些对象(包括.xib文件),出于某种原因,XCode 4找到了一个我没有重命名的对象? (我猜是因为它说不能加载它)。如何找到NIB的名称,或更改xib文件以便正确命名nib?

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 27080.
2011-03-11 09:43:00.142 PointsEncodeDecode[27080:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/rolfmarsh/Library/Application Support/iPhone Simulator/4.3/Applications/4066ECCF-3937-49B1-9FBE-1CE9BFA56844/PointsEncodeDecode.app> (loaded)' with name 'ReaderSampleViewController''

1 个答案:

答案 0 :(得分:0)

缺少的Nib似乎不是Info.plist文件中指定名称的应用程序的主Nib文件。也许另一个Nib文件具有旧的Nib名称,用于在其中创建外部对象。我首先删除整个build目录,然后grep所有文本引用到终端中的旧文件名,以找出仍有引用它的人。

grep -rnF '<old Nib name>' <path_to_your_project_directory>