I am building an iPhone application that requires the user to enter his credentials in order to use the application and can sign out in any moment.
I have used UITabBarController to navigate through my views, now I need to add a Logout button in a way that it is available/visible all the time.
Can anybody suggest a solution or best practice for this case?
Can you spare a tab bar item for that? It seems like the most clean way. Then you can use
method of the
UITabBarControllerDelegate.something like this (assuming that the logout tab is the 5th tab)
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { if ([tabBarController selectedIndex] == 4) { //LOGOUT } }