tags:

views:

28

answers:

1

My app is crashing when I navigate two view controllers in my application. For example, if I do this sequence:

RootController ViewControllerA
ViewControllerB ViewControllerA

My app crashes.

It crashes when I pressed the back button in ViewControllerB. So, It seems like it is with two or more ViewControllers being pushed. Each by themselves work.

I don't know why.

This is the code I am using to invoke new views.

    salesViewController *anotherViewController = [[salesViewController alloc] initWithNibName:@"salesView" bundle:nil];
    //confirmViewController *anotherViewController = [[confirmViewController alloc] initWithNibName:@"confirmView" bundle:nil];

    [self.navigationController pushViewController:anotherViewController animated:YES];
    [anotherViewController release];

Thanks in advance.

A: 

Good news is that your code to create new views is just fine. Bad news is that it's somewhere else. I found this conversation on the net that seems to be a similar issue.

Epsilon Prime
Thank you for the URL. After I read the post, I realized my problem was that I was calling release after dealloc.
jp chance