Switching Views on the iPhone
Switching Views on the iPhone
- Subject: Switching Views on the iPhone
- From: Steve Wetzel <email@hidden>
- Date: Tue, 06 Jan 2009 22:04:04 -0600
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@hidden)
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:
This email sent to email@hidden