我有一个导航视图控制器,可正确推送“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未启动。