Reputation: 5187
I have a UITabBarController with a profile tab. I want to present a login view controller if the profile tab is pressed, but the user is not logged in. If the user presses cancel, I want the tab bar controller to have the same tab selected as before.
Upvotes: 0
Views: 291
Reputation: 1313
You need to use UITabBarControllerDelegate
-tabBarController:shouldSelectViewController:
or
-tabBarController:didSelectViewController:
Detect your profile controller and present login controller.
Upvotes: 1