UITabBarController delegate with storyboard

Discussion in 'iOS Programming' started by lsegev, Mar 16, 2012.

  1. lsegev macrumors newbie

    Mar 16, 2012
    Hi developer's, i need help please,
    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 problems is:
    First, how can i create tabBar if the tabBar is not my rootView? my app start with login that is simple viewController, and after login the tabBar will appear.
    Second, where should i create the tab bar, in appDelegate or some else?

  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    According to Apple:
    So, how to do a login view that appears before the tab view? I've had success by making the tab view the root view and then presenting the login view modally.

Share This Page