Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Create tabBarController in your didFinishLaunching, but show it only after you show your first 4 screens without TabBar. This is a default didFinishLaunching, that is generated by Xcode when you chose standart TabBar app template: </p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; self.tabBarController = [[UITabBarController alloc] init]; self.tabBarController.viewControllers = @[viewController1, viewController2]; self.window.rootViewController = self.tabBarController; [self.window makeKeyAndVisible]; return YES; } </code></pre> <p>Here you should replace this line: </p> <pre><code>self.window.rootViewController = self.tabBarController; </code></pre> <p>with your line of showing your controller. Something like this: </p> <pre><code>LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; loginViewController.delegate = self; self.window.rootViewController = loginViewController; </code></pre> <p>Then, when you remove your last screen and want to show the tab bar, write this: </p> <pre><code>AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; appDelegate.window.rootViewController = self.tabBarController; </code></pre> <p>The main idea is that you just <strong>change the rootViewController of your app window</strong>. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload