Hi there
I'm a relatively new iPhone developer (although I'm gradually learning how things work..) but I've got a problem and can't find an easy solution. I was hoping someone could point me in the right direction. I'm finding view controllers to be the hardest thing to wrap my head around, so this problem is related to these.
I'm trying to build an application that will have a number of different 'types' of screen. The general user workflow will be as follows:
1. Login (using some sort of view controller I haven't yet determined)
2. Select some basic settings (using a NavigationViewController that I have already created)
3. Use a main menu (which is a TabBarViewController that I have already created)
4. From this main menu, select one of the tabs. Some of these will have buttons on them that then need to take them to another NavigationViewController, but WITHOUT the tabs being displayed.
I've managed to get most of the pieces of this working independently. Now I'm trying to hook it all up together. However, I'm really stuck about exactly where I should put the code to load each of the new controllers, and also what this code should look like.
I assume it will look like the following, from the app delegate:
Code:
// navigation controller for settings selection (step 2 above)
navigationController = [[UINavigationController alloc] init];
UIViewController *firstViewController = [[MyFirstNavigationViewController alloc] initWithNibName:@"FirstScreenForNumber2Above" bundle:[NSBundle mainBundle]];
[navigationController pushViewController:firstViewController
animated:NO];
[firstViewController release];
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
But again, I'm not sure exactly what I should be doing and where.
Can anyone help by either giving me an idea of this, or pointing me in the direction of a sample that uses this type of structure?
Many thanks in advance,
John