I know that if i have rootViewController that start with tabBar i can create UITabBar like this:
UITabBarController *tabController = (UITabBarController *)self.window.rootViewController;
tabController.selectedIndex = [defaults integerForKey:kOptionLastTabSelectedKey];
tabController.delegate = self;
But my problem is: how can i create tabBar if the tabBar is not my rootView? my app start with login with simple viewController, and after login the tabBar will appear.
Second, where should i create the tab bar, in appDelegate or some else?
Thank’s!!!
I think you should make your tabBarController to be rootViewController to ur window than present your loginViewController modally over window rootViewController and after login you can dismiss loginViewController .Check the following code.
and after the login use delegate method or write following code in the loginViewController class and dismiss loginViewController.
or