Quote:
Originally Posted by gunther
Ok problem partial solved... ready funciontion what just click in the cell the table view, the app show me the next view.. but i need a problem.. in the next view not show me the back button for go to the previous view..
this the code modifed for run the re send.. now what do?
- (void)tableView  UITableView *)tableView didSelectRowAtIndexPath  NSIndexPath *)indexPath {
nextCateViewController *nextController = [[nextCateViewController alloc] initWithNibName:@"nextCateView" bundle:nil];
[self.view addSubview:[nextController view]];
}
|
Ok, you're on the wrong track unfortunately. If you want a navigation stack, you shouldn't just add the next controller's view as a subview.
So, first thing is I'll explain the code tags. When you post on this forum there is a button above the textbox that is labelled '#'. This is in the toolbar two buttons left of the little 'php' button. If you use that, it looks like this:
Code:
[self.dog bark:once withAnger: YES];
which makes your code
much easier to read for everyone who might be trying to help. So please learn to use that and you'll soon have many experts trying to help you.
So, the issue here is that your categorias view is not part of a navigation stack. It is not on the stack of any navigation controller.
The problem goes back to your applicationDidFinishLaunching method in your app delegate. If you look carefully at that, what you have done is this:
- You created a nav controller
- You added it to the window
- You then created a tab bar controller
- You added a categorias view controller as the first tab of the tab bar controller
- (you added other controllers to other tabs)
- Then you put the tab bar controller's view on top of the navigation controller.
So now the navigation controller is basically gone. It's just hidden back there behind the tab bar controller and the user has no access to it anymore.
What you want is for the navigation controller to be attached to the first tab of the tab bar controller. So when you create your array of controllers that you use to set up the tab bar controller, the navigation controller should be the first item in that array.
And that navigation controller should have your categorias view controller as it's
root controller. That establishes it on the navigation stack. Then you can push your detail view controller into that stack and you get the back button you want and so on. And then when the user hits the back button, that detail view controller will be popped and you'll be back at the categories view and so on.
That's how a navigation controller works. I hope that helps.