【发布时间】:2012-06-05 12:40:29
【问题描述】:
我正在尝试将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。然而,这不是实际的方法。
我们将不胜感激。
【问题讨论】: