Navigation based application without a uitableview error
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开发者_JAVA技巧 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?
There are a few possibility.
Make sure that UITableView protocol is implemented in the header file. Eg
@interface TestingViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
Check that your connection from in the Interface Builder and make sure its linked properly
精彩评论