I receive this error when I click on the section of my Tab-Bar application that I am working with in the iOS Simulator:
Let me mention that my DebateNavigationViewController is a UIViewControllerSubclass
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[DebateNavigationViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x6b479a0’
* First throw call stack:
(0x1874d72 0x106be51 0x190111d 0x107f7f8 0x1864b12 0x186476e 0x1ed7f6 0x1f03c4 0xbc792 0xbc138 0xbf986 0xc4461 0x641bc 0x107f6be 0x1e683b6 0x1e5c748 0x1e5c55c 0x1dda7c4 0x1ddb92f 0x1e7dda2 0x2cb5f 0x183daae 0x183d9ed 0x181b752 0x181aed4 0x181adab 0x17d0923 0x17d07a8 0x17e71 0x262d 0x2555)
libc++abi.dylib: terminate called throwing an exception
Here is some of my code that is relevant:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableview:(UITableView *)tableview numberOfRowsInSection:(NSInteger)section
{
return _list.count;
}
Does anyone know what is going on?
EDIT:
Pic of Connections:
Connections
It could be that your DebateNavigationViewController is not inheriting from UITableViewController, or not implementing the Table View Datasource and Delegate protocols.
In your header file:
or
Also if you are using interface builder, make sure your connections and identities are all correct. (The connections for the table view delegate and datasource should be the DebateViewController.)