navigation between screens Iphone programming

Posted by Sephy on Stack Overflow See other posts from Stack Overflow or by Sephy
Published on 2010-04-19T12:55:40Z Indexed on 2010/04/19 13:23 UTC
Read the original article Hit count: 237

Filed under:
|
|

Hi,

I don't know if my question will be clear or not, but i'm starting basic stuff with iphone programming, and i'm trying to understand how to go from a screen to another. lets say i have a screen with a "next page" button and another page with a "return" button. I have a general idea of how to do this, but I don't know how to put it together. I think I need an IBAction method for each button, and in each method a navigation controller with pushViewController. So far, i've tried the following code, but even if it compiles properly and runs when i push the button, there is no change of screen...

-(IBAction) toNext(id)sender{
NSLog(@"before code");
NextViewController *nvc = [[NextViewController alloc] initWithNibName:@"NextView" bundle:nil];
[self.navigationController pushViewController:nvc animated:YES];
[nvc release];
NSLog(@"after code");
} 

If someone had a nice tuto for me, it could be of some help... thx

© Stack Overflow or respective owner

Related posts about iphone

Related posts about navigation