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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:49:48+00:00 2026-05-24T16:49:48+00:00

My main xib file has a tab bar controller and each tab is linked

  • 0

My main xib file has a tab bar controller and each tab is linked to a different xib.

One of the tabs is a nav controller and its view controller is linked to a xib as per this answer.

When I run the app I get the below error. its as if its not even looking in the view controller for these methods.

i have tried everything including using a different xib, checking the links in interface builder i.e. the tableview’s delegate and datasource. i have implemented the required protocol methods in the vc e.g. numberofrowsinsection.

as soon as i remove the datasource link in the xib the error goes away.

EDIT: When I add this view controller’s view to the main window (just to test) the tableview loads without issues. So it seems it only happens when I use it as part of the nav controller and tab controller.

Terminating app due to uncaught exception
‘NSInvalidArgumentException’, reason: ‘-[UIViewController
tableView:numberOfRowsInSection:]: unrecognized selector sent to
instance 0x6120ae0’
* Call stack at first throw: ( 0 CoreFoundation
0x00dc45a9 exceptionPreprocess + 185 1 libobjc.A.dylib
0x00f18313 objc_exception_throw + 44 2 CoreFoundation
0x00dc60bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3
CoreFoundation 0x00d35966 __forwarding
+ 966
4 CoreFoundation 0x00d35522
_CF_forwarding_prep_0 + 50 5 UIKit
0x001d32b7 -[UISectionRowData
refreshWithSection:tableView:tableViewRowData:] + 1834 6 UIKit
0x001d0d88 -[UITableViewRowData numberOfRows] + 108 7 UIKit
0x00084677 -[UITableView noteNumberOfRowsChanged] + 132 8 UIKit
0x00091708 -[UITableView reloadData] + 773 9 UIKit
0x0008e844 -[UITableView layoutSubviews] + 42 10 QuartzCore
0x016aea5a -[CALayer layoutSublayers] + 181 11 QuartzCore
0x016b0ddc CALayerLayoutIfNeeded + 220 12 QuartzCore
0x016560b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
13 QuartzCore 0x01657294
_ZN2CA11Transaction6commitEv + 292 14 QuartzCore
0x0165746d
_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
15 CoreFoundation 0x00da589b
CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 27 16
CoreFoundation 0x00d3a6e7 __CFRunLoopDoObservers
+ 295 17 CoreFoundation 0x00d031d7
__CFRunLoopRun + 1575 18 CoreFoundation
0x00d02840 CFRunLoopRunSpecific + 208 19 CoreFoundation
0x00d02761 CFRunLoopRunInMode + 97 20 GraphicsServices
0x00ffc1c4 GSEventRunModal + 217 21 GraphicsServices
0x00ffc289 GSEventRun + 115 22 UIKit
0x00024c93 UIApplicationMain + 1160 23 MyPractice
0x00002339 main + 121 24 MyPractice
0x000022b5 start + 53 ) terminate called after throwing an instance of
‘NSException’

  • 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-24T16:49:49+00:00Added an answer on May 24, 2026 at 4:49 pm

    This log message:

    [UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 
    

    Implies that the UITableView dataSource method is being sent to an instance of UIViewController, not an instance of your subclass. How are you initialising your VC? If you’re initialising it from within a XIB, have you correctly set the VC’s class to your subclass?

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

Sidebar

Related Questions

My MainWindow.xib has a Tab Bar Controller in it with various tabs. Each tab
My application has a view controller that extends UITableViewController . The initialization method looks
Greetings, Problem: I have a main view, that already is associated with a xib
Looking for some guidance. In my main window nib file, i have a tab
I have a table view which loads another xib file and uses the content
I have a tab bar control application in XCode 4 and before the main
if you make an app that has a main menu does every one of
I deleted main menu from my xib file. How can I recreate it without
No nib/IB, so I've inserted myAppDelegate in main and deleted the reference to main.xib
The main user-case is: Create the 2D floor plan See the 3D view 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.