开发者

Cancelling a modal view crashes the app -- Seeking Solution

My app is crashing when I am trying to dismiss a modal view using:

[self dismissModalViewControllerAnimated:NO];

This is the flow of the application:

ViewController (My app landing screen) --> Push couple of view controllers --> Show the modal view.

Now, is my intention of canceling the modal view from the same modal controller (self) is correct or should I cancel it from somewhere else.

I had tried p开发者_如何学Goassing the object of the last conroller class in the stack to my modal controller and tried following code but it still crashes:

[self.lastStackObj dismissModalViewControllerAnimated:NO];

Appreciate if someone can guide!!!


try this :

[self.parentViewController dismissModalViewControllerAnimated:NO];


maybe you're releasing an already released object in the dealloc. try commenting all the release statements in the dealloc & then try running, hopefully it wont crash. You can fix it by finding the variable & releasing it only once.

There maybe other problems causing this too. But this is the first thing i'd look for.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜