Reputation: 2818
I am trying to create a UITableView
inside a UICollectionViewCell
. My goal is to implement a tableview inside my CollectionViewCell and populate my tableView with simple data. I want to create pages of tableViews populated with different categories of data.
I thought it would be a relative easy task, however I am getting a Threat 1: signal SIGABRT error. The debugger is prints
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'-[TableViewMockUp.ViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x100b07cc0'
I am not sure what this error is telling me. When I look inside my ViewController I don't have a tableView numberOfRowsInSection method.
I have the project on Git if you want to take a look: https://github.com/cyrilivargarcia/TableViewMockUp
Below is a snapshot of my ViewController class
This is a snapshot of my CollectionViewClass which is where I created my TableViews.
Any idea on how I can resolve this problem?
Upvotes: 0
Views: 281
Reputation: 77681
-[TableViewMockUp.ViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x100b07cc0
I am not sure what this error is telling me. When I look inside my ViewController I don't have a tableView numberOfRowsInSection method.
You've hit the nail on the head. The error is telling you "you don't have a numberOfRowsInSection method", and your reply is "I don't have one".
So... you just need to add that method to your view controller :)
Edit: After reviewing your code, to clarify for your specific case...
You had your TableView Delegate and DataSource connected to the wrong thing.
That should do it!
Upvotes: 1