Hello,
I am working on an application with a LoginViewController and a TabBarViewcontroller.
When the application is ran, I add the LoginViewController as a subView of window in the delegate. Once the login is ok, I remove the LoginViewController (removeFromSuperView) and add the TabBarViewController instead as a subview of windows.
This works fine.
In one of the tab of the TabBar I have a view containing a button to disconnect the user. When clicking on the button it performs the opposite than what described above: - remove the TabBarViewcontroller from the superView - add the loginViewController instead.
This works also fine except for 2 things:
when I login again, I get directly on the last tab I used (the one with the disconnect button) when I'd like to get to the first one
If I login with another user, the TabBarController is not refreshed (I see the data of the previous user... kind of dangerous:) ).
Well, those 2 things seems to be related to the same problem, the TabBarViewController is not unloaded and reloaded. Could you please help on how to do this ?
Thanks a lot, Luc