2011-05-26 84 views
0

包中加載的筆尖,我使用此代碼加載我的看法,但在錯誤發生,這裏是代碼:無法在iPhone上的設備「SIGBART」

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

但它不工作。我該怎麼辦?

+6

你有一種奇怪的方式來定義你的標識符名稱,這是肯定的! – LuckyLuke 2011-05-26 12:38:24

+0

什麼是控制檯上的錯誤 – 2011-05-26 12:38:30

+0

您是否從NIB(XIB)創建視圖控制器? – petert 2011-05-26 12:40:37

回答

4

嘗試以下代碼:

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

,而不是僅僅分配視圖控制器對象。她的NIB是沒有.xib擴展名的xib文件名。