問題: 4 つのタブを含む tabViewController があり、最初のタブには sideMenuViewControllerを含む homeViewController があります。今、一度だけログインする tabViewController の前に loginViewController を追加したいと思います。以下の AppDelegate.m クラスのコード。
Now I want to include loginViewController before the tabViewController
AppDelegate.m に必要な変更を提案してください
AppDelegate.m
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
tabBarController = (UITabBarController *) self.window.rootViewController;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]];
MFSideMenuContainerViewController *container = (MFSideMenuContainerViewController *)tabBarController.viewControllers [0];
NSParameterAssert ([container isKindOfClass: [MFSideMenuContainerViewController class]]);
// UIViewController *historycontr=(UIViewController *)tabBarController.viewControllers[2];
// UIViewController *hist=[storyboard instantiateViewControllerWithIdentifier:@"historyController"];
UINavigationController *navigationController = [storyboard instantiateViewControllerWithIdentifier:@"navigationController"];
UIViewController *leftSideMenuViewController = [storyboard instantiateViewControllerWithIdentifier:@"leftSideMenuViewController"];
UIViewController *rightSideMenuViewController = [storyboard instantiateViewControllerWithIdentifier:@"rightSideMenuViewController"];
[container setLeftMenuViewController:leftSideMenuViewController];
[container setRightMenuViewController:rightSideMenuViewController];
[container setCenterViewController:navigationController];
return YES;
}