0
我有一個UINavigationController
,它具有UITableViewController
,因爲它是根視圖。 UINavigationController
位於UITabBarController
之內。導航控制器中的UITabBarController中的UINavigationController具有多個視圖
在的UITableViewController(* viewOne),如果我點擊一個電池單元的下面的代碼運行
UIViewController *newView = [[UIViewController alloc] initWithNibName:@"newView" bundle:nil];
[self.navigationController pushViewController:newView animated:YES];
[newView release];
然後,NewView的內部是:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
NSLog(@"%@", self.navigationController);
}
return self;
}
日誌有:
[8947:207] (null)
如果我嘗試將新的視圖控制器推送到navigationController,則什麼都不會發生。任何線索?