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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:14:35+00:00 2026-06-09T06:14:35+00:00

In my project there is a xib file whose File Owner is set to

  • 0

In my project there is a xib file whose File Owner is set to a subclass of NSViewController. This xib file has a NSView with a View Based NSTableView inside. The NSViewController subclass implements the protocol NSTableViewDelegate and, in IB, the NSTableView’s delegate is connected to File’s Owner. When a view is created by bindings, the awakeFromNib method of the viewController gets called with this call stack:

#0  0x000000010000584b in -[TheViewController awakeFromNib] 
#1  0x00007fff890f9bd8 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] ()
#2  0x00007fff893101d6 in -[NSNib _instantiateNibWithExternalNameTable:] ()
#3  0x00007fff89310c7a in -[NSNib instantiateNibWithExternalNameTable:] ()
#4  0x00007fff892bcac4 in -[NSTableRowData _unarchiveViewWithIdentifier:owner:] ()
#5  0x00007fff892be57b in -[NSTableView(NSTableViewViewBased) makeViewForTableColumn:row:] ()
#6  0x00007fff892be1b2 in -[NSTableRowData _addViewToRowView:atColumn:row:] ()
#7  0x00007fff892bde7f in -[NSTableRowData _addViewsToRowView:atRow:] ()
#8  0x00007fff892bc415 in -[NSTableRowData _addRowViewForVisibleRow:withPriorView:] ()
#9  0x00007fff892bc19a in -[NSTableRowData _addRowViewForVisibleRow:withPriorRowIndex:inDictionary:withRowAnimation:] ()
#10 0x00007fff892bb469 in -[NSTableRowData _unsafeUpdateVisibleRowEntries] ()
#11 0x00007fff892bb001 in -[NSTableRowData updateVisibleRowViews] ()
#12 0x00007fff892930fb in -[NSTableView viewWillDraw] ()
#13 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#14 0x00007fff884d50b6 in __NSArrayEnumerate ()
#15 0x00007fff8917092d in -[NSView viewWillDraw] ()
#16 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#17 0x00007fff884d50b6 in __NSArrayEnumerate ()
#18 0x00007fff8917092d in -[NSView viewWillDraw] ()
#19 0x00007fff891fb455 in -[NSScrollView viewWillDraw] ()
#20 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#21 0x00007fff884d50b6 in __NSArrayEnumerate ()
#22 0x00007fff8917092d in -[NSView viewWillDraw] ()
#23 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#24 0x00007fff884d50b6 in __NSArrayEnumerate ()
#25 0x00007fff8917092d in -[NSView viewWillDraw] ()
#26 0x00007fff89247e0d in -[NSBox viewWillDraw] ()
#27 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#28 0x00007fff884d50b6 in __NSArrayEnumerate ()
#29 0x00007fff8917092d in -[NSView viewWillDraw] ()
#30 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#31 0x00007fff884d50b6 in __NSArrayEnumerate ()
#32 0x00007fff8917092d in -[NSView viewWillDraw] ()
#33 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#34 0x00007fff884d50b6 in __NSArrayEnumerate ()
#35 0x00007fff8917092d in -[NSView viewWillDraw] ()
#36 0x00007fff89170bed in __22-[NSView viewWillDraw]_block_invoke_0 ()
#37 0x00007fff884d50b6 in __NSArrayEnumerate ()
#38 0x00007fff8917092d in -[NSView viewWillDraw] ()
#39 0x00007fff8916ff84 in -[NSView _sendViewWillDrawInRect:clipRootView:] ()
#40 0x00007fff8913c3f1 in -[NSView displayIfNeeded] ()
#41 0x00007fff891f93f8 in -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] ()
#42 0x00007fff891f8a18 in -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] ()
#43 0x00007fff891f85ff in -[NSWindow orderWindow:relativeTo:] ()
#44 0x00007fff890f9c96 in -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] ()
#45 0x00007fff890d8b7d in loadNib ()
#46 0x00007fff890d80a9 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] ()
#47 0x00007fff890d7ede in -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] ()
#48 0x00007fff890d7cbe in +[NSBundle(NSNibLoading) loadNibNamed:owner:] ()
#49 0x00007fff890d447f in NSApplicationMain ()
#50 0x0000000100001432 in main

The awakeFromNib method shouldn’t be called only after the viewController is instantiated?

  • 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-09T06:14:36+00:00Added an answer on June 9, 2026 at 6:14 am

    It seems like from my experience that the File's Owner of any xib document will receive an -awakeFromNib message whenever a new view is loaded from that xib file. This would, as you noticed, occur when view-based table views create new rows from the xib file.

    And I know of no way to stop that from happening, except to maybe keep track of how many times you’ve called awakeFromNib and execute the initialization code only the first time.

    Or, better yet, put your initialization logic in another method that has a more solid timing – e.g. in -loadView, after the call to super. I do something like:

    - (void)loadView {
        [self vvViewWillLoad];
        [super loadView];
        [self vvViewDidLoad];
    }
    
    - (void)vvViewDidLoad {
        ... // initialization material here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my project there was a file named view controller.xib. I deleted a button
When creating a standard MVC 3 project there is an EntityFramework.dll and .xml file
Is a MainController.xib file required for every iOS project? Reason I ask is because
If I create a new project in xcode, there will be a main xib
When I create a new cocoa project in Xcode, it creates a MainMenu.xib file
UIScrollView is set programmatically, please dont post answers with using .xib file. My UIScrollView
I have a project. When I choose some xib file, iPhone simulator shows in
I have a Storyboard project witch i need to have an xib file loading
UPDATE: All working now, forgot to link up the view in the .xib file.
I am using an iOS 5 storyboard-based project. When presenting a modal view controller

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.