The program has a nav bar and normally when clicking a button in viewController1 it goes to viewController2. when clicking a button in viewController2 it goes to viewController3. and the user can navigate back from viewController3 to viewController2 then to viewController1 using the back button in the navigation bar.
I want to make a button that programatically takes the user directly to viewController3 from viewController1. then the user can navigate back from viewController3 to viewController2 to viewController1.
Is there a way to push two views into the navigation controller? or is another way to achieve the desired behavior? how should i design this?
Sorry for misreading your question. Because you want to push 2 view controller and then go back 1 by 1. I think the solution now is simple.
You only need to push view controller 2 times, 1 without animation and 1 with animation like this:
So, for the user, it happens like you only push 1 but in behind the scene, you actually push 2 view controllers. Then when you want to come back, just need to pop 1 by 1.