我正在尝试更改in RootViewController
。
但我不知道我该怎么做。NavigationController
didFinishLaunchingWithOptions
这是我的代码didFinishLaunchingWithOptions
:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *rootController=[[HomePageController alloc] initWithNibName:@"HomePageController" bundle:nil];
navigationController=[[UINavigationController alloc] initWithRootViewController:rootController];
// presentation=[[PresentationController alloc]initWithNibName:@"PresentationController" bundle:nil];
//
// navigationController=[[UINavigationController alloc]initWithRootViewController:presentation];
//
// presentationList=[[PresentationListController alloc]initWithNibName:@"PresentationListController" bundle:nil];
//
// UINavigationController *listnavigation = [[UINavigationController alloc] initWithRootViewController:presentationList];
//
// revealer=[[ZUUIRevealController alloc]initWithFrontViewController:navigationController rearViewController:listnavigation];
[self.window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;
}
现在我评论然后运行应用程序来改变rootviewcontroller
. 然而,这不是实用的方法。
任何帮助将不胜感激。