Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Basically What you need to do is push a Tab View Controller onto the Navigation Controller's viewcontroller stack.</p> <p>Starting with a fresh "Navigation-Based Application" template. I added the following method in RootViewController.m :</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Navigation logic may go here. Create and push another view controller. UIViewController *viewOneViewController = [[UIViewController alloc] init]; viewOneViewController.title = @"One"; viewOneViewController.view.backgroundColor = [UIColor redColor]; UIViewController *viewTwoViewController = [[UIViewController alloc] init]; viewTwoViewController.title = @"Two"; viewTwoViewController.view.backgroundColor = [UIColor orangeColor]; UIViewController *viewThreeViewController = [[UIViewController alloc] init]; viewThreeViewController.title = @"Three"; viewThreeViewController.view.backgroundColor = [UIColor greenColor]; UITabBarController *anotherViewController = [[UITabBarController alloc] init]; anotherViewController.viewControllers = [NSArray arrayWithObjects:viewOneViewController, viewTwoViewController, viewThreeViewController, nil]; [self.navigationController pushViewController:anotherViewController animated:YES]; [anotherViewController release]; </code></pre> <p>}</p> <p>Changed this to 25 to test: </p> <pre><code>- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 25; } </code></pre> <p>Now when I build and run I'll see what you are looking for in a basic way. What you will want to do after you get this working is to change the UIViewControllers to Custom Subclasses that you create to hold the code for each view. (If you are also using Interface Builder, change the init to initWithNibNamed:).</p> <p>Hope this helps you get on your way a bit.</p>
 

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