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

  • SEARCH
  • Home
  • 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 6805843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:38:10+00:00 2026-05-26T19:38:10+00:00

I want to start my app up with a different Xib. How would I

  • 0

I want to start my app up with a different Xib. How would I do this?

Thanks

  • 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-05-26T19:38:11+00:00Added an answer on May 26, 2026 at 7:38 pm

    If you’re using interface builder:

    Under SupportingFiles, in -info.plist, look for a key named “Main nib file base name”. Change that to the XIB you want it to load first

    You can also take that entry out of the plist altogether an in main.m give it your appDelegate’s name:

        int retVal = UIApplicationMain(argc, argv, nil, @"HelloViewAppDelegate");
    

    Then in your appDelegate, you can manually load your first view controller based on your code and logic. Personally, I like this better because it’s much clearer to – here’s my delegate and code to load it. It doesn’t have all the bindings in IB I need to remember.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    
        // Override point for customization after application launch.
        CGRect screenBounds = [[UIScreen mainScreen] applicationFrame];
        CGRect windowBounds = screenBounds;
        windowBounds.origin.y = 0.0;
    
        // init window
        [self setWindow: [[UIWindow alloc] initWithFrame:screenBounds]];
    
        // init view controller
        _mainViewController = [[MainViewController alloc] init];
    
        [[self window] addSubview:[_mainViewController view]];
    
        [self.window makeKeyAndVisible];
        return YES;
    }
    

    EDIT:

    Answering your comment below. You pasted this invalid code:

    // init view controller 
    ViewController = [[ViewController alloc] init]; 
    [[self window] addSubview:[ViewController view]]; 
    

    That’s not valid. you need an instance variable name. By referring to it as “ViewController” your attempting to call class member variables. If your class is called ViewController then it should be:

    // notice the instance myviewController is of type ViewController
    ViewController *myViewController = [[ViewController alloc] init]; 
    // notice calling view against instance (myViewController)
    [[self window] addSubview:[myViewController view]]; 
    

    At this point, if it’s not compiling you need to edit your question and paste your main.m and appDelegate exactly as is into the question.

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

Sidebar

Related Questions

In this app I want a button press to open a different Java file
I have a tab-based iPhone app where I want to increase the perceived start-up
I have a situation like this: start(); <Some code> end(); I want start() function
I'm new to UNIX. I want to start my java app with a script
My WinForms app uses Process.Start() to open files in their native app. I want
Small problem here I want to make a small fb app which show different
I have multiple different Activity in my app and I don't want any transition
I want to write a app which will run on different computers and need
I want to start several threads, retrive data from net, perform some actions with
I want to start a phar script as an executable, directly by doing foo.phar

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.