mac mittereder
mac mittereder

Reputation: 21

How to create different columns in table view?

I'm trying to have a table view set up but I'd like to have different columns as well. I want to have 3 pictures set across one row and when the user presses on one of the images the image gets passed to the next view controller. I have the passing of the image fine it's just that I don't know how to go through doing what I want to do.

I have my images set up in a 2D array that I use like this:

cell.image1.image = [UIImage imageNamed:_imagesToDisplay[row][0]];
cell.image2.image = [UIImage imageNamed:_imagesToDisplay[row][1]];
cell.image3.image = [UIImage imageNamed:_imagesToDisplay[row][2]];

End Result

This is how I have the image views set up at the moment but that's what I'm going for. Any help? Sorry, I'm very new to objective-C.

Upvotes: 1

Views: 86

Answers (2)

nhgrif
nhgrif

Reputation: 62052

UICollectionView is what you want. UITableView is 100% wrong for this.

Upvotes: 1

AyAz
AyAz

Reputation: 2057

Go through UICollectionView for this purpose.

Upvotes: 2

Related Questions