问题描述
|
我正在使用此代码加载我的视图,但发生了错误,这是代码:
charecterprofile *View = [[charecterprofile alloc] init];
[self.navigationController pushViewController:View animated:YES];
[View release];
但这行不通。我该怎么办?
解决方法
尝试以下代码:
charecterprofile *view = [[charecterprofile alloc] initWithNibName:@\"NIB\" bundle:[NSBundle mainBundle]];
而不只是分配视图控制器对象。她的NIB是您的xib文件名,不带.xib扩展名。