UITabBarController delegate with storyboard

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

  1. macrumors newbie

    Joined:
    Mar 16, 2012
    #1
    Hi developer's, i need help please,
    I know that if i have rootViewController that start with tabBar i can create UITabBar like this:
    Code:
    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?

    Thank's!!!
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    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