Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone UIDABBARC控制器内的UINavigationController,在导航控制器中具有多个视图_Iphone_Objective C_Uinavigationcontroller_Uitabbarcontroller - Fatal编程技术网

Iphone UIDABBARC控制器内的UINavigationController,在导航控制器中具有多个视图

Iphone UIDABBARC控制器内的UINavigationController,在导航控制器中具有多个视图,iphone,objective-c,uinavigationcontroller,uitabbarcontroller,Iphone,Objective C,Uinavigationcontroller,Uitabbarcontroller,我有一个UINavigationController,它的根视图是UITableViewController。UINavigationController位于UITABBARC控制器内 在UITableViewController*viewOne中,如果单击单元格a,将运行以下代码 UIViewController *newView = [[UIViewController alloc] initWithNibName:@"newView" bundle:nil]; [self.navigati

我有一个UINavigationController,它的根视图是UITableViewController。UINavigationController位于UITABBARC控制器内

在UITableViewController*viewOne中,如果单击单元格a,将运行以下代码

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,什么也不会发生。有什么线索吗?

我已经找到了

在我的应用程序委托中,我添加了一个新属性:

UINavigationController *profileNavigationController;
@property (nonatomic, retain) IBOutlet UINavigationController *profileNavigationController;
在IB中,我已将profileNavigationController从应用程序委托连接到导航控制器

现在,当推出新视图时,我称之为:

StartDateSelectorViewController *startDateSelectorViewController = [[StartDateSelectorViewController alloc] initWithNibName:@"StartDateSelectorView" bundle:nil];

Strength_EngineAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
[delegate.profileNavigationController pushViewController:startDateSelectorViewController animated:YES ];