Reputation: 453
I'm using pushViewController
from my home view to go to the logoutView
. After logout, I'm using a performSegue
to redirect to the loginView
.
Can it be a problem if I didn't use popViewController
? (In term of stack or something like that).
2)
This is like that
(1) LoginViewController --> Prepare for segue --> HomeViewController --> PushViewController --> LogoutViewController
So from logoutViewController, what can I do go to back safely in LoginViewController ?
Edit : I did it. Thanks
Upvotes: 1
Views: 185
Reputation: 907
I would highly, strongly recommend that you NOT do that. I am almost certain that you will pop another log-in controller onto the view controller stack. You will then have 4 view controllers in the stack when you only want one. Please look at this post on unwind segues or use popViewController.
http://stackoverflow.com/questions/12561735/what-are-unwind-segues-for-and-how-do-you-use-them
Upvotes: 1