UITabBar with TableView using Nib
I am developing one application which contains one TabBar. OnTouch of a tab bar item I am loading a different nib. This nib contains a 开发者_如何学JAVAnavigation bar + tableview. I am connecting the datasource and delegates of the table to the File's Owner and getting the following error.
When I am disconnecting the dataSource with the file's owner then it is responding but the Table Functions are not working.
Any suggestions how can I make the TableView functions working ?
EDIT :
My .h file :
.m file :
Xib Connections
Still the same error. :(
Your data source does not implement the tableView:numberOfRowsInSection:
, that's the reason of the error.
If you have doubts about it, please post the data source implementation, so we can help further.
EDIT: a few more checks...
How are you loading the nib file? initWithNibName or loadNibNamed?
Is the controller view outlet connected to your view? (I guess so, but just asking)
Are you doing anything special in your controller's initWithNibName, loadView, or viewDidLoad?
If in doubt, add more code from those methods (text is fine)
If you are using your UIViewController
as delegate and data source for its table, it has to implements the methods from the UITableViewDataSource
and UITableViewDelegate
protocols.
The method tableView:numberOfRowsInSection:
is one of those strictly required in the class that implements the UITableViewDataSource
protocol, so you probably want to fix this implementation.
精彩评论