I am trying to switch views in a view based application. I have a button on the main view and in the ViewController code for that view I have the following:

-(IBAction)settings:(id)sender {
        if(self.settingsViewController == nil) {
                SettingsViewController *settings = [[SettingsViewController 
alloc]
                                        initWithNibName:@"Settings" 
bundle:[NSBundle mainBundle]];
                self.settingsViewController = settings;
                [settings release];
        }
[self.navigationController pushViewController:self.settingsViewController animated:YES];
}

The code runs just fine but the second view does not appear. I have set the class of my second view to SettingsViewController, and linked the view with the "Files Owner"

And yes, the button is attached to the method. I can step through it just fine.

What am I missing here?

Steve
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to