2012-10-31 52 views
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'' 

如何处理这个捆绑笔尖让它工作?

回答

0

案例:

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

解决方案:

情况1:

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

情况2:

use correct name of .xib file