Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8728697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:41:58+00:00 2026-06-13T08:41:58+00:00

I am adding UITabBarController in my IPhone application.I hav mentioned it in my TabsAppDelegate.h

  • 0

I am adding UITabBarController in my IPhone application.I hav mentioned it in my TabsAppDelegate.h like this

#import <UIKit/UIKit.h>

@interface TabsAppDelegate : NSObject <UIApplicationDelegate,   UITabBarControllerDelegate> {
    UIWindow *window;
    UITabBarController *tabBarController;
}

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


@end

and my TabsAppDelegate.m didFinishLaunchingWithOptions method

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions {    



    // Add the tab bar controller's view to the window and display.
    [window addSubview:tabBarController.view];
    [window makeKeyAndVisible];

    return YES;
}

Now in MainWindow.xib i added Tab Bar controller and make connection with tabBarController.
And later i created FirstViewController and SeconViewController which are two ViewControllers.
Now at first tab i added my FirstViewController.xib and on second tab i added SecondViewController.xib file using builder interface.

But when i run the project it shows black screen.
Need your help.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:42:00+00:00Added an answer on June 13, 2026 at 8:42 am
     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
        {
    
    
            UIViewController *viewController1 = [[[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil] autorelease];
                    UINavigationController *navviewController1=[[UINavigationController alloc]initWithRootViewController:viewController1];
                    navviewController1.title = @"FirstTitle";
            //        navviewController1.navigationBarHidden=YES;
    
            UIViewController *viewController2 = [[[yourviewController2 alloc] initWithNibName:@"yourviewController2" bundle:nil] autorelease];
                    UINavigationController *navviewController2=[[UINavigationController alloc]initWithRootViewController:viewController2];
            //        navviewController2.navigationBarHidden=YES;
                    navviewController2.title = @"SecondTitle";
    
            UIViewController *viewController3 = [[[yourviewController3 alloc] initWithNibName:@"yourviewController2" bundle:nil] autorelease];
                    UINavigationController *navviewController3=[[UINavigationController alloc]initWithRootViewController:viewController3];
            //        navviewController3.navigationBarHidden=YES;
                    navviewController3.title = @"ThirdTitle";
    
                   //..... and so on depend on your requirement 
    
            self.tabBarController = [[[UITabBarController alloc] init] autorelease];
            self.tabBarController.viewControllers = [NSArray arrayWithObjects:navviewController1, navviewController2 , navviewController3 ,nil];
            self.window.rootViewController = self.tabBarController;
            [self.window makeKeyAndVisible];
        }
    

    try this you just forgot to add rootViewController

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Adding strings localization files in iPhone bundle is very simple and perfectly fine but
After adding a second persistence unit and changing my application's data sources to XADataSource
I am adding a badge to my UITabBarController's UITabBar as such: UITabBarItem *tbi =
I am creating and adding UITabBarController programatically in my App Delegate. I have 5
Adding methods to native JavaScript objects like Object, Function, Array, String, etc considered as
Adding contents to listview is a simple proceess like ListViewItem item = new ListViewItem();
I would like for one tab in a UITabBarController to have a fixed position
I have created a UITabBarController and adding to a UIViewController subview. My code is
i'm developing an iPhone application and i'm implementing the navigation among views with the
My current application consists of a UITabBarController with 4 different tabs and a UIViewController.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.