views:

618

answers:

1

Hey, We have a situation where we are trying to add two UITableViews inside a single UIScrollView. This seemed to be working (the two UITableViews are displayed properly) BUT 1) the data in the second UITableView is always the same as the data in the first one 2) when clicking items in the second UITableView, we get an exception: "unrecognized selector sent to instance"

The two tables have different controlers with different functions for cellForRowAtIndexPath but we noticed the cellForRowAtIndexPath for the second UITableView is not being called at all.

We are probably doing something wrong, can anyone help us guess what?

Thanks...

+3  A: 

Are the delegate and dataSource properties of both tables pointing to the correct controllers? If both tables are showing one controller's data, my first check would be to make sure the dataSource property is pointing at the correct controller.

Fraser Speirs
thanks. we forgot to set the datasource using setDataSource. setting the datasource fixed the problem.
Nir Levy