将 spliviewController 添加为 rootviewcontroller 后,我需要提供一个登录 Viewcontroller
MasterVC *masterViewController = [[[MasterVC alloc] initWithNibName:@"MasterVC" bundle:nil] autorelease];
UINavigationController *masterNavigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease] ;
masterNavigationController.navigationBar.barStyle=UIBarStyleBlackOpaque;
masterNavigationController.delegate=masterViewController;
Home *detailViewController = [[[Home alloc] initWithNibName:@"home" bundle:nil] autorelease];
UINavigationController *detailNavigationController = [[[UINavigationController alloc] initWithRootViewController:detailViewController] autorelease];
detailNavigationController.navigationBar.barStyle=UIBarStyleBlackOpaque;
self.splitViewController = [[[UISplitViewController alloc] init] autorelease];
self.splitViewController.viewControllers = [NSArray arrayWithObjects:masterNavigationController, detailNavigationController, nil];
self.window.rootViewController=self.splitViewController;
LoginVC *modalLoginView = [[[LoginVC alloc] initWithNibName:@"LoginVC" bundle:nil] autorelease];
[modalLoginView setModalPresentationStyle:UIModalPresentationFullScreen];
[self.splitViewController presentModalViewController:modalLoginView animated:NO];
[self.window makeKeyAndVisible];
return YES;
但是没有显示登录视图。请帮助。在此先感谢