Hi,
i've a 3 views based app. To navigate from different views i use the delegate method, for example in the second view i've a delegate which is the reference to the first view and when i want to pass from the second to the first view, i call a method of the delegate which made a simple : [self dismissModalViewControllerAnimated:YES];
.
Now the problem is that i need to do this thing:
1 ---> 2 ---> 3 ---> 1 . So i want to return to the first view from the third. Using the dismissModalViewControllerAnimated i can see just a moment that i transit through the second view and then i reach the first. If it's possible, i want to avoid this thing. I found something about the possibility to use the [self.navigationController popToRootViewControllerAnimated:NO];
, i tried to use it instead of dismissModalViewControllerAnimated but the program did anything.
Update
Problem solved, every problem was caused by the incorrect initialization of UINavigationController
. I find a solution to init it correctly inside my AppDelegate file:
UINavigationController* controller=[[UINavigationController alloc] initWithRootViewController:viewController];
controller.navigationBarHidden=TRUE;
[window addSubview:controller.view];
[window makeKeyAndVisible];
Now everything works fine, the only thing which leaves me perplexed is that i can't release my controller
instance otherwise the views will not diplay.
Thank you to all !!!