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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:45:35+00:00 2026-05-19T13:45:35+00:00

I am going through some sample code from Apple. The following 5 statements are

  • 0

I am going through some sample code from Apple. The following 5 statements are from MoveMeAppDelegate.m belonging to the “MoveMe” sample project:

UIViewController *aViewController = [[UIViewController alloc] initWithNibName:@"MoveMeView" bundle:[NSBundle mainBundle]];

self.viewController = aViewController;
[aViewController release];

UIView *controllersView = [viewController view];
[window addSubview:controllersView];

From documentation, @”MoveMeView” defines the name of a xib file. But it seems that a xib file can have more than one view object. And in the last statement above, the controllersView is added to a window object. My question is if the window has more than one view, then how does the compiler know which view is the above codes referring to ?

  • 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-19T13:45:35+00:00Added an answer on May 19, 2026 at 1:45 pm

    If you’re asking how your app knows which view is the controller’s view: in your .xib file, you “attach” one of the views to the controller. This relationship is called an outlet, and in code is signified by the IBOutlet tag on an instance variable or on a property.

    For more information, check out Apple’s Resource Programming Guide–specifically, the section entitled “Nib Files.”

    If you’re asking how the window knows which views belong to it: a window on iOS is also a view, and can have a (nearly) unlimited number of subviews.

    If you’re asking something else… I don’t know what you’re asking, so please clarify.

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

Sidebar

Related Questions

I was going through some code and came across a scenario where my combobox
While going through university and from following the development of SO, I've heard a
I am going through some pl/sql code with no comments. Trying to make sense
I was going through the AVCam project from WWDC and I'm curious about the
I'm going through some old stored procedures at work and constantly come across CASE
We're going through a massive migration project at the minute and trying to validate
I'm starting to learn C by reading K&R and going through some of the
We are currently going through the long process of writing some coding standards for
I was going through someone's code where I came across a thread: while(TRUE) {
I'm looking at writing some code that performs shadow mapping, in DX9. The sample

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.