开发者

iPhone SDK: Navigation is causing crash

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 开发者_如何学Goin 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜