2012-10-29 103 views
0

在調用下面的代碼點擊按鈕時,但我的weeklyReviewViewController.xib未加載,但應用程序正在註銷到初始視圖控制器上。以編程方式實例化新的xib

if(buttonIndex == 0 ){ 
     NSLog(@"0"); 
     [self.viewController initWithNibName:@"WeeklyReviewViewController" bundle:nil]; 
     navcnt = [[UINavigationController alloc] initWithRootViewController:self.viewController]; 
     NSLog(@"navigation controller %@",navcnt); 
     notificationCounter = YES; 
     self.window.rootViewController = navcnt; 
    } 

回答

0

請檢查self.viewController類型是否與WeeklyReviewViewController類型相同。

相關問題