I have a Navigation Controller with a View Controller displaying a button. The button is linked to another View Controller using a push segue which automatically adds a top navi
On Objective-C is
[self.navigationController popViewControllerAnimated:YES];
for a jump to the first root
controller
[self.navigationController popToRootViewControllerAnimated:YES];
or is a possible move to the specific controller
[self.navigationController popToViewController:(nonnull UIViewController *) animated:(BOOL)];
animation specific animation process of move the controller. If the animation is false
the controller will appear without animations.
The UIViewController
must be from one which is on the stack.