开发者

Navigation based application without a uitableview error

开发者 https://www.devze.com 2023-04-12 09:40 出处:网络
I do this: First create navigation based application. Then delete UITableView from rootViewController.xib, add a UIView connect it to File\'s Owner.

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.

  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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号