无法在iPhone设备上加载nib捆绑“SIGABRT”

时间:2011-05-26 12:35:30

标签: iphone xcode nib

我正在使用此代码加载我的视图,但错误发生了,这是代码:

charecterprofile *View = [[charecterprofile alloc] init];
    [self.navigationController pushViewController:View animated:YES];
    [View release];

但它不起作用。我该怎么办?

1 个答案:

答案 0 :(得分:4)

请尝试以下代码:

charecterprofile *view = [[charecterprofile alloc] initWithNibName:@"NIB" bundle:[NSBundle mainBundle]];

而不是仅分配视图控制器对象。她的NIB是没有.xib扩展名的xib文件名。