2011-03-11 116 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