Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Rather than start over, you may just want to create a tab-bar-based app and look at the code it produces, then try to do the same thing in your app.</p> <p>You probably just need to change your application delegate's <code>application:didFinishLaunchingWithOptions:</code> method to look something like this:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSMutableArray *viewControllers = [[[NSMutableArray alloc] init] autorelease]; // First tab MyController *myController = [[[MyController alloc] init] autorelease]; mapViewController.navigationItem.title = @"First"; UINavigationController *myRootController = [[[UINavigationController alloc] initWithRootViewController:myController] autorelease]; myRootController.tabBarItem.title = @"First"; myRootController.tabBarItem.image = [UIImage imageNamed:@"MyControllerTab"]; [viewControllers addObject:myRootController]; // Second tab MyOtherController *myOtherController = [[[MyOtherController alloc] init] autorelease]; myOtherController.navigationItem.title = @"Second"; UINavigationController *otherRootController = [[[UINavigationController alloc] initWithRootViewController:myOtherController] autorelease]; otherRootController.tabBarItem.title = @"Second"; otherRootController.tabBarItem.image = [UIImage imageNamed:@"OtherControllerTab"]; [viewControllers addObject:otherRootController]; // Create other tabs // ... // Tab bar UITabBarController *tabBarController = [[[UITabBarController alloc] init] autorelease]; [tabBarController setViewControllers:viewControllers]; [self.window setRootViewController:tabBarController]; [self.window makeKeyAndVisible]; return YES; } </code></pre>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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