Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is an <a href="http://codenugget.org/how-to-embed-a-navigation-controller-inside-a" rel="nofollow">tutorial</a> that I was able to get working.</p> <p>I also read the official SDK documentation on the topic: <a href="http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/CombiningToolbarandNavigationControllers/CombiningToolbarandNavigationControllers.html#//apple_ref/doc/uid/TP40007457-CH8-SW1" rel="nofollow">Combining Tab Bar and Navigation Controllers</a>. Since I'm still learning, the <a href="http://codenugget.org/how-to-embed-a-navigation-controller-inside-a" rel="nofollow">tutorial</a> helped me more than the docs.</p> <p>else try this code</p> <pre><code>- (void)applicationDidFinishLaunching:(UIApplication *)application { // Create instance of UINavigationController UINavigationController *myNavigationController; // Create initialized instance of UITabBarController UITabBarController *tabBarController = [[UITabBarController alloc] init]; // Create initialized instance of NSMutableArray to hold our UINavigationControllers NSMutableArray *tabs = [[NSMutableArray alloc] init]; // Create first UIViewController UIViewController *myFirstViewController = [[UIViewController alloc] init]; [myFirstViewController setTitle:@"First"]; // Initialize the UINavigationController myNavigationController = [[UINavigationController alloc] initWithRootViewController:myFirstViewController]; // Add UINavigationController to you tabs [tabs addObject:myNavigationController]; // Release UIViewController and UINavigationController [myFirstViewController release], [myNavigationController release]; // Create second UIViewController UIViewController *mySecondViewController = [[UIViewController alloc] init]; [mySecondViewController setTitle:@"Second"]; // Initialize the UINavigationController myNavigationController = [[UINavigationController alloc] initWithRootViewController:mySecondViewController]; // Add UINavigationController to you tabs [tabs addObject:myNavigationController]; // Release UIViewController and UINavigationController [mySecondViewController release], [myNavigationController release]; // Add the tabs to the UITabBarController [tabBarController setViewControllers:tabs]; // Add the view of the UITabBarController to the window [self.window addSubview:tabBarController.view]; } </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.
 

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