Navigating between 2 ViewControllers
Posted
by
Kobe.o4
on Stack Overflow
See other posts from Stack Overflow
or by Kobe.o4
Published on 2012-07-02T08:42:29Z
Indexed on
2012/07/02
9:15 UTC
Read the original article
Hit count: 180
Im using Navigation Controller
for my ViewControllers
,I set my importantViewController
as something like this to be its RootView
:
UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: vc];
[self presentModalViewController: navControl animated: YES];
Then, I pushView anotherView the FrontViewController
like this:
[self.navigationController pushViewController:vc animated:YES];
After a button is pressed in FrontViewController
another view will be pushed ViewA
but it is connected with another ViewController ViewB
the same way as this AGAIN:
[self.navigationController pushViewController:vc animated:YES];
(Which I think Im doing wrong when dismissing either of them with [self.navigationController popViewControllerAnimated:YES];
)
This is an illustration:
My problem is, I need to navigate between View A and View B then when I dismiss either of them it will got back to FrontViewController
. Like a child of a child View. Thanks.
© Stack Overflow or respective owner