在我的基於導航應用,initWithNibName方法不叫/火initWithNibName ....方法不點火
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
我在的appdelegate定義RootViewController的(calViewController)這樣
calViewController *objCalViewController = (calViewController *) [navController topViewController];
objCalViewController.context = [self managedObjectContext];
[window addSubview:navController.view];
[window makeKeyAndVisible];
這是問題嗎?請給我一個幫助
你如何創建視圖控制器?你的第一個代碼段是什麼類? – jrturton 2012-02-08 10:15:54