Take the 2-minute tour ×

I do this: First create navigation based application. Then delete UITableView from rootViewController.xib, add a UIView connect it to File's Owner. Change UITableView to UIViewController in RootViewcontroller.h Finally clean all methods of UITableView in RootViewcontroller.m

But when I run the project receives this error:

-[RootViewcontroller tableView:numberOfRowsInSection:]:unreconized selector sent to instance

What am I doing wrong?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

There are a few possibility.

  1. Make sure that UITableView protocol is implemented in the header file. Eg @interface TestingViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>

  2. Check that your connection from in the Interface Builder and make sure its linked properly

share|improve this answer
add comment

Your Answer


