I have an application that uses OAuth, which has something like this: if the user token request is valid A UITabBarController loads with stored four views, otherwise the user brings it to the login screen.
I realized today that if I am logged in to my app, log out and switch to another user, then the first user's data is displayed till I refresh it with no The tab, which was last seen by the previous user, is displayed (which is very strange for a user's perspective).
I thought about removing Tabber Controller and creating a new one, but I realized that I did not have to make sure that, how I set everything through the interface builder (In addition, I do not even know that this is the best way.)
What is a good way to log out of A -> Log in to B? Apart from this, if you need more information, I would be happy to expand.
Thank you!
I do this by doing this
login
- Load and display a long screen
- Load the root view controller in the background
- Enter the root view controller behind the login screen
- Remove the login / Release the login screen after login
logout
- Load the login screen and place it under the view stack (behind the root view)
- Root View Remove / release the controller (login looks)
- ... start with login 2
If you store specific data in user documents directory , Stores it in sub-directories as a directory name with a user name or an ID. One directory for each user
Comments
Post a Comment