Ipad 拆分视图前的登录屏幕

Ipad 拆分视图前的登录屏幕,ipad,Ipad,我需要在将SPLiveWController添加为rootviewcontroller后提供登录Viewcontroller MasterVC *masterViewController = [[[MasterVC alloc] initWithNibName:@"MasterVC" bundle:nil] autorelease]; UINavigationController *masterNavigationController = [[[UINavigationController al

我需要在将SPLiveWController添加为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;
但是没有显示登录视图。
请提供帮助。提前感谢

尝试在主视图或详细视图的ViewDidDisplay事件中显示模式视图。 显然,appDelegate现在尝试做UI演示还为时过早,因为还没有界面

您还需要将splitViewController的视图作为子视图添加到窗口中

[self.window addSubView:self.spliViewController.view];