UITableView Threats: keep getting this runtime error by unrecognized selector

Guys guys

I have this error that prevents me from moving forward. I basically have an application that contains a UITabViewController that points to individual UIViewControllers. So, one of the tabs, I want to implement a basic TableViewController.

Now, no matter what I do, regardless of whether I cut it and paste it in a sample UIViewController code that implements a UITableView or something else, or even just the default UITableViewController pattern from Xcode, I get the same error below:

2009-09-06 12: 29: 23.889 iKosher [12536: 207] * - [UIViewController tableView: numberOfRowsInSection:]: unrecognized selector sent to instance 0xe1d8d0 2009-09-06 12: 29: 23.891 iKosher [12536: 207] * Application termination due to the uncaught exception "NSInvalidArgumentException", reason: "*** - [UIViewController tableView: numberOfRowsInSection:]: unrecognized selector sent to instance 0xe1d8d0 '2009-09-06 12: 29: 23.891 iKosher [12536: 207] Stack: (807902715, 2492915529, 808284155, ...

In IB, all I did was drag and drop onto the UITableView and set its delegates to point to the owner of the file.

Not sure what else I can do from here.

+3
4

, File Owner IB UITableViewController, , tableView, .

+5

, tableView: numberOfRowsInSection: UIViewController. , , UITableViewDataSource.

UITableViewController, , , tableView: numberOfRowsInSection: ( , , ).

, .

+1

, Interface Builder.

+1

UITableView .

I connected to the UITableView on my ViewController, but I really needed both of them to connect to the β€œFile Owner” (note that I work with xibs, not the storyboard).

I found that the whole process is confusing and a lot of work.

I wrote my impressions of this here .

+1
source

Source: https://habr.com/ru/post/1716995/


All Articles