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 8346461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:01:18+00:00 2026-06-09T07:01:18+00:00

I had an app delegate and I needed to add custom tab bar controller

  • 0

I had an app delegate and I needed to add custom tab bar controller to override UITabbarController. I have created Window user interface, reference Window to Appdelegate’s Window object. made File’s owner to UIApplication, added NSObject and changed identity class to my delegate, added UITabbarController and changed identity class to my custom tabbar controller. Now I see very unusual that Window object in didFinishLaunchingWithOptions is coming nil so I don’t see anything on the screen. Also my custom tabbar controller object is nil! Following is my new Window structure and main.m. Could anyone please tell me where am I doing wrong? Thanks.

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}


Appdelegate.h

#import <UIKit/UIKit.h>
#import "CustomTabBarController.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate>

@property (strong, nonatomic) IBOutlet UIWindow *window;

@property (strong, nonatomic) IBOutlet CustomTabBarController *tabBarController;

@end

Appdelegate.m

#import "AppDelegate.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize tabBarController = _tabBarController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    if(_window == nil) // This is true for self.Window as well!
        NSLog(@"nil");
    if(_tabBarController.view == nil)
        NSLog(@"nil");
    [self.window addSubview:self.tabBarController.view];
    [self.window makeKeyAndVisible];
    return YES;
}  

enter image description here

  • 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-09T07:01:20+00:00Added an answer on June 9, 2026 at 7:01 am

    I got this resolved…Two things were missing.

    1. File’s owner inspector, reference outlets delegate to AppDelegate.
    2. In project’s target settings, set main interface to newly created Window.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a navigation controller app. I created a RootViewController class with Xib file.
I'm programmatically creating a tab bar based app. In the application:didFinishLaunchingWithOptions (app delegate) method
Me and My friend had an app idea. I have been working on the
I have an app that uses ASI-HTTP-Request for large files, and I had a
My app has a singleton class called CycleManager. I have created a sealed class
I've been searching around but unfortunately have had no luck. My app requires the
I have two string properties setup in my cocoa application's app delegate which are
I have an iPhone application that's using Navigation Controller to display the top bar
My app tracks a user with CLLocationManager . In the delegate call didUpdateToLocation I
I had this app using 1.9.2 and rails 3.2 and today I changed the

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.