pixelbitlabs pixelbitlabs - 1 year ago 82
iOS Question

Why is my new view controller not appearing?

I am using the following code to push my view controller, except when the UIButton is pressed - nothing happens apart from the NSLog statement:


NSLog(@"Change Passcode Screen Loaded!");

ChangePasscode *cpscreen = [[ChangePasscode alloc] initWithNibName:@"ChangePasscode" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:cpscreen animated:YES];


I have imported the relavant files (using #import) so everything should be fine...

Why is this happening?


Answer Source

Have you debugged and checked that your navigationController isn't nil ?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download