0

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;

しかし、ログインビューは表示されていません。親切に助けてください。事前に感謝します

4

1 に答える 1