0

我是 ios 新手,无法完成非常简单的事情。

TableViewController *tableVC = [[TableViewController alloc] initWithNibName:@"TableView" bundle:nil andType:CONTROLLER_TYPE_FIRST];
ViewController *wizard = [[ViewController alloc] initWithNibName:@"WizardView" bundle:nil andtype:first];
UINavigationController *navC = [[UINavigationController alloc] initWithRootViewController:wizard];

用 tableVC 初始化,可以。但是如果我用向导初始化我会得到

'Could not load NIB in bundle: 'NSBundle </Users/Mac/Library/Application Support/iPhone Simulator/6.0/Applications/60750878-E595-4A24-B0B8-F65DA78128C0/kodinisRaktas.app> (loaded)' with name 'WizardView''

如何处理这个捆绑笔尖以使其正常工作?

4

1 回答 1

0

案例:

  1. ViewController doesnot have .xib.
  2. ViewController does have .xib but its name is not 'WizardView'.

解决方案:

情况1:

 ViewController *wizard = [[ViewController alloc] init];

案例二:

use correct name of .xib file
于 2012-10-31T10:10:11.707 回答