不显示从导航控制器推送的视图控制器

时间:2011-12-18 13:19:54

标签: objective-c ios xcode cocoa-touch uinavigationcontroller

我有一个导航视图控制器,可正确推送“viewController1”。然后,从“viewController1”,调用goToApp函数以推送“appViewController”。执行函数goToApp但是应用程序保持在同一视图“viewControlller1”。怎么推呢?谢谢。

来自viewController1的

 navigationViewController *theInstance = [[navigationViewController alloc] init];
    [theInstance goToApp];
navigationViewController中的

-(void)goToApp {

    appViewController *AppsViewController = [[appViewController alloc] initWithNibName:@"appViewController" bundle:nil];

    [[self navController] pushViewController:AppsViewController animated:YES];

    [AppsViewController release];

}

goToApp已执行,但appViewController未启动。

0 个答案:

没有答案