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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:32:03+00:00 2026-05-28T23:32:03+00:00

Does awakeFromNib get called right after viewController is allocated and initialized? At what precise

  • 0

Does awakeFromNib get called right after viewController is allocated and initialized?
At what precise point does the awakeFromNib of a view controller get called?
From my debugging session, I see that awakeFromNib for the rootViewController doesn’t get called until [self.window makeKeyAndVisible] is executed.

  • 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-28T23:32:04+00:00Added an answer on May 28, 2026 at 11:32 pm

    awakeFromNib gets called after the view and its subviews were allocated and initialized. It is guaranteed that the view will have all its outlet instance variables set.

    EDIT: A detailed recount of events:

    During the instantiation process, each object in the archive is
    unarchived and then initialized with the method befitting its type.
    Cocoa views (and custom views that can be customized using an
    associated Interface Builder palette) are initialized using their
    initWithCoder: method. Custom views are initialized using their
    initWithFrame: method. Custom classes that have been instantiated in
    the nib are initialized using their init method.

    Once all objects have been instantiated and initialized from the
    archive, the nib loading code attempts to reestablish the connections
    between each object’s outlets and the corresponding target objects. If
    your custom objects have outlets, an NSNib object attempts to
    reestablish any connections you created in Interface Builder. It
    starts by trying to establish the connections using your object’s own
    methods first. For each outlet that needs a connection, the NSNib
    object looks for a method of the form setOutletName: in your object.
    If that method exists, the NSNib object calls it, passing the target
    object as a parameter. If you did not define a setter method with that
    exact name, the NSNib object searches the object for an instance
    variable (of type IBOutlet id) with the corresponding outlet name and
    tries to set its value directly. If an instance variable with the
    correct name cannot be found, initialization of that connection does
    not occur. Finally, after all the objects are fully initialized, each
    receives an awakeFromNib message.

    Source

    EDIT 2: This doesn’t apply to view controllers loaded from storyboards.

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

Sidebar

Related Questions

Does Google force employees who have offers from Facebook to leave immediately?
Does anyone know how to get IntelliSense to work reliably when working in C/C++
I am creating a viewController programmatically (hopefully the right way) My problem is that
Does anyone know how to make this code stop the knob from rotating past
I'm using a method in my view to set a color, and in awakeFromNib
Does anyone have any good information aside from the Google App Engine docs provided
Does anyone have any suggestions for the best / simplest way to view all
does someone know how I can get Sublime Text 2 to auto-hide the tabs
Does anyone remember the XMP tag? What was it used for and why was
Does the Java language have delegate features, similar to how C# has support for

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.