I have six viewControllers. On viewController1 I have a button which takes me to the viewController6.
Now from viewController6 I want to pop back to viewController5, viewController4, viewController3, viewController2 and viewController1 respectively.
How can I do this?
Try this,
Insert your required view controllers in order using
If you want to replace only previous viewController use,
Then set back the navigation stack,
Then you can use following to pop back to any viewController :