views:

335

answers:

2

Now can I display an image in a table view. The big thing is there will be multiple data sources and each one has a different image. I'm using pubsub to get the data.

Ex:

data source 1

image

-data

-data1

data source 2

image 1

-data 2

-data 3

+1  A: 

You need a controller object that is set as the datasource of the table view. It is the job of that single controller to tell the table view what to display. You don't implement multiple data sources for a table view.

Your controller should aggregate the data from the various sources and display it in your desired layout by returning appropriate values from the various NSTableDataSource methods. How you do this is up to you.

Rob Keniger
A: 

Drag the image cell from IB's Library palette into the table column where you want to show images. Then, serve up those images from your data source (singular, as Rob Keniger notes).

Peter Hosey