2011-03-11 115 views
0

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

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'' 

回答

0

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

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

NIB是否由XIB构建? – SpokaneDude 2011-03-11 18:30:42

+0

是的。准确地说,我应该使用术语Xib,因为它在Xib到Nib转换之前。但是因为有一天我习惯使用这两个术语互换.... – MHC 2011-03-11 19:22:20