views:

227

answers:

1

I have a Windows based application. I have a series of buttons in the xib. When I click on one of the buttons I want it to load a table view or a web page or a text view (depending on the button). This is the code I am using to attempt to move to the table view (which has its own xib). It prints the NSLogs lines in the console. It does none of the navigation. What am I missing? Is this not the way it is supposed to work?

-(IBAction)vocabListPressed:(id)sender {
    NSLog(@"Exiting vocabListPressed");

    VocabListController *second = [[VocabListController alloc] initWithNibName:@"VocabListController" bundle:nil];

    [second setTitle:@"Vocabulary List"];

    [self.navigationController pushViewController:second animated:YES];

    [second release];

    NSLog(@"Entering vocabListPressed");
}
A: 

I would start a new iPhone OS project using the Navigation-based Application template, so that you can take advantage of the boiler-plate code for getting a navigation controller, etc.

gerry3
I am assuming that I cannot use the Navigation-based application template. I need two different navigation controllers, plus a view that flips like a utility template, and a webview. I was able to get all of the navigation controller views working (easy with the template), but I could not get the others to work. That is why I changed to the window app.
Beathard
Well, you can start with ANY template and add or modify it as you need. Depending on your end result, some templates are more appropriate than others. In any case, you have not provided enough information for us to help you. Have you created the navigation controller? Do you have non-nil references to it when you are pushing the view controller?
gerry3