I have four viewControllers in my application. Now lets suppose user is currently on the second viewController and He terminates the application.
Now how can I save this state, so that when user reopen the application he should be presented with the second viewContoller, and should be able to navigate back to first viewContoller as well.
The solution I have in my mind is to simply save a variable of current screen in userDefaults and then make that viewController a rootViewController. But I know its not the proper solution and I will lose navigation as well. Please guide me thanks.