I am working on a project in which I authenticate the user using login. When I logout, the user come back to the login page.The problem I have is when the user logs out and log’s in again the user is shown in the same tab from which he logged out and the data is still stored.
I build a tabbar application and in the 1st tab i present the login using modular view and in each tab when I call logout present the login using modular view. So its just a tabbar applicaiton in which login is presented modularly.
Can any one please tell me how to fix this or do I have any structural flaw? I really appreciate your time for looking int this.
Thanks
The act of presenting a modal view will never clear out the underlying views data after being presented (that would be entirely bizarre).
So you have to manually clean up your views on logout – either by implementing a reset method on the view controllers that erases the information displayed in the views and that you call during your logout processing (i.e. clears text fields, lists etc.), or by (on logout as well) releasing the individual view controllers or the whole tab view controller and recreating it again on login.