tags:

views:

89

answers:

1

Hi, My i have to develop simple window based iphone application. In my first screen I design the UITabBarController with four TabBarButton.On first Tab screen contains three buttons. When i click on of the button, the screen should navigate on simple tableView screen.But tableView screen the TabBarController should have be visible. Means simply first replacing with table view and move back to again previous one(The UITabBarController should be visible on all srceen).

A: 

Wrap your root view controllers in UINavigationControllers. Then, add the UINavigationControllers to the UITabBarController (so there should be 4 UINavigationControllers, one for each tab). When the button is clicked in the original view controller, do something like:

-(void) buttonClicked {
    SimpleTableViewController *tvc = //etc
    [self.navigationController pushViewController:tvc animated:YES];
    [tvc release];
}
eman
@eman, Thanks.Why i can not used a single UINavigationController.When if i used navigation controller for first TabBarButton, then i click other TabBarButton, it would not be release for first one and assign to new one? The above process is happening with other tabbarbutton also, so that we removing multiple UINAviagationController in design or removing a lot of ambiguity in UINavigationController also.
RRB
`UINavigationController` is implemented as a stack, with a list of view controllers that get pushed on and popped off. It can't manage multiple stacks (so you can't share it between tabs). Conceptually, the tab bar controller "owns" the navigation controllers, each of which "owns" the view controllers in its stack. The practical advantage of having multiple navigation controllers is that when switching between tabs, the user's place in the stack is saved, so there's automatic persistence.
eman
@eman, Thanks.U wrote the great article on navigation controller with TabBarController. Please give me some tutorial or article on navigation of iphone apps if i have any?
RRB
http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html
eman
@eman, I still confusing meaning of root view controller.Why we needed? Which controller it(root view controller) belongs to?
RRB
The root view controller is just the bottom view controller in a `UINavigationController` stack (it's just a commonly used term).
eman
@eman,Hi. I also written in my code but it not navigate on other controller.-(IBAction)buttonClick:(id)sender{itemMenuTable = [[menuTable alloc]initWithNibName:@"menuTable" bundle:nil];[self.appDelegate.nvcHome pushViewController:itemMenuTable animated:YES];[appDelegate.nvcHome release];}My problem is actual given on following link.http://stackoverflow.com/questions/2683831/problem-in-to-navigate-on-uitableview-on-the-uibuttonclick-which-is-present-in-uiThanks.
RRB