我正在开发具有 CustomTabBar(3 个选项卡)、导航栏和 SplitView 控制器的 iPad 应用程序。
应用程序屏幕如下:
1-登录屏幕(通过 SplitView 呈现)>> 忘记密码(按登录导航)
2-如果在登录导航上推送忘记密码,它将被弹出,然后登录将在成功登录时被取消。
3- 成功登录后,会显示 SplitView。
我如何在 AppDelegate 中编码:
self.detailViewController = [[[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil] autorelease]; UINavigationController *detailNavigationController = [[[UINavigationController alloc] initWithRootViewController:self.detailViewController] autorelease];
customTabBarCont = [[CustomTabBarController alloc] init];
self.splitViewController = [[[UISplitViewController alloc] init] autorelease];
self.splitViewController.delegate = self.detailViewController;
NSArray *viewControllers = [[[NSArray alloc] initWithObjects:customTabBarCont,detailNavigationController, nil] autorelease];
self.splitViewController.viewControllers = viewControllers;
self.detailViewController.splitViewController = self.splitViewController;
self.window.rootViewController = self.splitViewController;
[self.window makeKeyAndVisible];
loginVC = [[[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil] autorelease];
UINavigationController *loginNavigationController = [[[UINavigationController alloc] initWithRootViewController:loginVC] autorelease];
[self.splitViewController presentViewController:loginNavigationController animated:NO completion:nil];
我有 SettingViewController,我在其中提供了注销功能。
当用户从 Portrait 注销并在 LandscapeView 中登录时,它会产生问题
我如何为 SignOut 编码
self.loginVC = [[[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil] autorelease];
if ([app_delegate.detailViewController.masterPopoverController isPopoverVisible]) {
[app_delegate.detailViewController.masterPopoverController dismissPopoverAnimated:NO];
}
UINavigationController *loginNavigationController = [[[UINavigationController alloc] initWithRootViewController:self.loginVC] autorelease];
当我们再次旋转时,一切顺利。但是如何解决这个问题。或者我错了。