I'm working on an application that uses the new Storyboard functionality in Xcode 4.2
Is there a way of programatically sending a user back to the initial view controller from any point within the application?
For example when a session expires and they need to login again (initial view controller is my login screen)
I assume that you are using a UINavigationController
. Then you can use the popToRootViewControllerAnimated:
method. You should be able to do this with this line:
[self.navigationController popToRootViewControllerAnimated:NO]; // Put YES for animation.
You can read more about the UINavigationController
in the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With