views:

48

answers:

2

Hi all! I'm creating an game in which I need to provide this facility of being able to come to the first screen from any level, and go to any level from first screen(in case of RESUME), for which I'm using a navigation controller. The problem I'm facing is I dont want this pushing to look animated so I wrote

[self.navigationController pushViewController:level1_complete animated:NO];

It works fine for pushing my first level. But after that level is over, the application crashes as no other viewController gets pushed, and if I make this animated property to be "YES", then evrything works fine but it appears animatedly ofcourse... I dont want it to look animated and make it run.

Can anybody please help? Thanks in advance.

A: 

Hi, Neha

are you pushing another view controller from level1_complete ?

if yes then make it also as animated:NO

i think problem will be resolved...

yakub_moriss
Hi, yakub_morissYes, I'm pushing a view controller and also writing animated as NO there. Still it's crashing..
neha
try to bebug by putting break point and send me code with line no which which makes the prog crash...
yakub_moriss
A: 

What are you doing with the navigation controller when the level is completed?

You should be able to do something like:

//Level One Completed
//Pop level one view controller to return to the main screen
[self.navigationController popViewControllerAnimated:NO];