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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:35:40+00:00 2026-05-25T11:35:40+00:00

Beginning with XCode 4.2, when you create an empty project using XCode 4.2, a

  • 0

Beginning with XCode 4.2, when you create an empty project using XCode 4.2, a MainWindow.xib is no longer created and hooked up for you. I’ve found an article that describes how to do this and I’ve done it and it works, but if this process has taught me anything, it has shown me that I have no idea how main(), AppDelegate and the MainWindow.xib exist together.

http://www.trappers.tk/site/2011/06/16/mainwindow-xib/

  • Why is MainWindow.xib class updated to UIApplication?
  • Why is an object placed on the xib, and then AppDelegate class is selected for the class?
  • Why is the delegate outlet of the File Owner connected the AppDelegate object?
  • Why is the the window outlet of the AppDelegate to the Window?
  • why does – (BOOL) application:didFinishLaunchingWithOptions: need to be commented out.

I’ve researched around but, I’m still not 100% sure how everything is loaded up once the application starts, and why this is setup is needed just to have a MainWindow. I have a feeling though that I should probably get all these concepts down to continue to advance in iOS development.

  • 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-25T11:35:40+00:00Added an answer on May 25, 2026 at 11:35 am
    • Why is MainWindow.xib class updated to UIApplication?

    At the lowest level, nib files are loaded with the method -[UINib instantiateWithOwner:options:]. The File’s Owner in a nib file is a placeholder. In Xcode, it isn’t a specific object yet. It will resolve to an actual object when the nib file is loaded. Its purpose is to relate, via outlets and actions, objects inside of the nib with the object that loaded the nib. The object passed as the “instantiateWithOwner:” parameter of that UINib method is what the File’s Owner placeholder in Interface Builder will resolve to.

    UIApplication loads the nib file specified in the info.plist and passes ‘self’ for the owner parameter when loading the nib file.

    By setting the class name, you’re just hinting to the tools so that they can suggest the set of actions and outlets you’re allowed to establish.

    • Why is an object placed on the xib, and then AppDelegate class is selected for the class?

    When you place the generic object in the xib and change its class to ‘AppDelegate’ you’re telling Xcode to instantiate an instance of ‘AppDelegate’ when the file is loaded.

    • Why is the delegate outlet of the File Owner connected the AppDelegate object?

    UIApplication has a ‘delegate’ that it delegates responsibility to and notifies when interesting events occur. When you make this connection, you’re setting the delegate property of the application to be the instance that you specified above. From that point on, this instance will receive the delegate messages from UIApplication, like -application:didFinishLaunchingWithOptions:.

    • Why is the the window outlet of the AppDelegate to the Window?

    Outlets are a way to refer to objects inside of a xib. They cause properties or instance variables to be set to refer to the object pointed to by the outlet. When you make this outlet, you’re making it so that the app delegate instance you created above has a way to refer to the window that’s also created when the xib is loaded.

    • why does – (BOOL) application:didFinishLaunchingWithOptions: need to be commented out.

    It represents the code-focused way to do some of the same things that are happening in the xib, and if they were both present, they would be overwriting each other.

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

Sidebar

Related Questions

I'm at the beginning/middle of a project that we chose to implement using GWT.
I am using the latest Xcode and i created a view based universal app
I'm beginning work on a new project that will use WF4 for business processes
I am using Xcode 4.2 on a relatively large project (a few ten thousand
When beginning a new web project, i'm always a bit worried about removing pieces
I'm really beginning to understand what people mean when they say that C++'s error
I am just beginning to do research into the feasibility of using Amazon's SimpleDB
I've just purchased a Mac and am beginning to explore software development using Cocoa
I have a macruby project in xcode, in which I want to replace all
I have a problem using a carriage return to rewind to the beginning of

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.