UITabBarController Not Appearing in View

Discussion in 'iOS Programming' started by nightcrawler234, Jun 29, 2011.

  1. nightcrawler234 macrumors newbie

    Joined:
    Jul 21, 2010
    #1
    Hi, I started out with the utility application as the template.

    Trying to add a UITabBarController to the flipside view.

    in the flipsideviewcontroller.h, I declared:

    UITabBarController *tabBarController;
    @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;


    synthesized it in the .m


    and added
    Code:
    - (void)viewDidLoad {
        [super viewDidLoad];
        self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];  
        
    
    	
    	pickerArray = [[NSMutableArray alloc] init]; 
    	[pickerArray addObject:@"Manage Inventory"]; 
    	[pickerArray addObject:@"Order Parts"]; 
        [pickerArray addObject:@"Blueprints"]; 
    	
    	
    	[window addSubview:tabBarController.view];
    	[window makeKeyAndVisible];
    	
    		
    	
    	
    	
    }


    I created 2 additional view controllers:
    FirstTabViewController and SecondTabViewController
    Made one red, one blue

    Opened up my flipside .xib


    Added a uitabbarcontroller to the box
    changed class and nib of tab 1 to firsttabviewcontroller and class/nib of tab 2 to secondtabview controller

    And connected file's owner to the UITabBarcontroller

    Is this right?

    Appreciate the help
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Why don't you start a new project with Tab's already on it? :)
    That might spare you the headeache of trying and trying.. :)
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    A new project based on the Tab Bar Application template is going to have the tab bar controller as the root view controller. Sounds like the OP wants the tabs to be part of a subsequent view (the flipside of a Utility app); therefore, I'm not sure how your advice will help.

    It sounds right. What kind of issues are you encountering?
     
  4. Shawnpk macrumors 6502

    Joined:
    Jan 13, 2011
    Location:
    Los Angeles, CA
    #4
    You say you opened the flip side view.xib and connected the file's owner to the UITabBarController, but what exactly did you connect? Maybe your connection is wrong.
     

Share This Page