So I have 2 tabs in tab bar controller.
tab 1 is the rootController. tab 2 is a tableviewcontroller which gets user information (like signing up)
What happens now:
Tab 1 appears first, and I need to click on tab 2 .
What I need:
When I open the app, I want the app to start off with Tab 2 (if there are no users in the app ). This should be the very first screen. And then onwards (if there is an user) it should work with tab 1 as the root controller, and the 1st screen.
Do
tabBarController.selectedIndex = 1;ortabBarController.selectedViewController = loginViewController;In
application:didFinishLaunchingWithOptions:,This assumes that
usersholds all your users information. Seva’s suggestion for using modal view controller is definitely a better approach to deal withLogin‘s. If by users you mean profiles, then this isn’t a bad approach either.