cdub
cdub

Reputation: 25701

Proper way to logout and return to the rootViewController

I have a logout mechanism in place in my ios app that when the user clicks a button, the user gets logged out. How do I redirect properly to the rootViewController?

Do I just do this:

[self presentViewController:photo animated:YES completion:nil];

Upvotes: 0

Views: 94

Answers (1)

Jogendra.Com
Jogendra.Com

Reputation: 6454

Try this

 [self.navigationController popToRootViewControllerAnimated:YES];

Upvotes: 2

Related Questions