Correct way to add "Tab Bar" in Navigation based tamplate in iPhon
- by iPhoneDev
I have added Tab Bar in Navigation based tamplate like this:
[self.navigationController pushViewController:anotherViewController animated:YES];
And I think this is not the correct way to have Tab Bar in detail view in Navigation based tamplate.
Please make me correct?
UnsentView *unsent = [[UnsentView alloc] initWithNibName:@"UnsentView" bundle:nil];
unsent.title =@"Unsent";
UITabBarController *anotherViewController = [[UITabBarController alloc] init];
anotherViewController.viewControllers = [NSArray arrayWithObjects: unsent, setting, nil];
[self.navigationController pushViewController:anotherViewController animated:YES];
[anotherViewController release];