在我的應用程序中,我推送了一個視圖控制器(一個UITableViewController),它也有一個引用UITableViewCell的屬性/插座。看來,與創建所述控制器:UIViewController init vs initWithNibName:bundle:
PreferencesController *pController = [[PreferencesController alloc] init];
在XIB文件不創建用於的UITableViewCell對象,因此,出口空,從而表裝載生成異常。 我解決了這個有:
PreferencesController *pController = [[PreferencesController alloc] initWithNibName:@"PreferencesController" bundle:nil];
,但我真的不知道爲什麼它的工作,從文檔似乎初始化應足以加載相關筆尖文件(PreferencesController.xib)。
文件對PreferencesController.xib所有者類是PreferencesController和LibraryMenuController.xib是LibraryMenuController ..
的一點是,在文件的所有者不是由視圖屬性鏈接的廈門國際銀行的對象不加載init方法,但initWithNibName是需要的。 – Fr4ncis 2011-05-31 14:47:16