PopToRootViewControllerAnimated Question

I have a UINavigationController in my iPhone application that controls views in expanded form. I have 4 view managers that I pass before I have the Start Through button, where I would like the action to send the user back to the top of the view hierarchy.

[self.navigationController popToRootViewControllerAnimated:YES];

but it looks like it just calls the new rootview controller on top of the current view controller.

Is there a way to bring the views back to the very beginning of the navigation?

Any help would be great!

Thanks a lot, Brett

+3
source share
2 answers

- . popToRootViewControllerAnimated , , .

0

,

[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:3] animated:YES];

'objectAtIndex: 3' - ( ) viewControllers. 0.

0

Source: https://habr.com/ru/post/1755413/


All Articles