views:

911

answers:

1

I have a UIScrollView that contains multiple UITableViews horizontally - all of which are created programmatically depending on the user's action.

Say I have 4 UITableViews, how do I set the datasource and delegate for each one programmatically? I understand there are tableViewX.dataSource and tableViewY.delegate methods; and I assume I set them to an NSObject that obeys the UITableViewDataSource and UITableViewDelegate protocols, but everything I try seems to do nothing to my UITableViews.

I created the NSObject from a template of the UITableViewController and changed its class type.

A: 

Ah. Figured it out. Needed to allocate and initiate the NSObject first, before setting it as the delegate and dataSource.

Xeph