Multiple columns in iOS

I am working on an application using object C and Xcode.

At the moment I am using a table view and returning rows with cells containing the thumb and the title of the image. My problem is that now I need to change the layout for the 4 cells that I need so that they fall on the same line (therefore, each article of 4 should be 50% of width). So basically create 2 columns, but only for 4 articles. The rest remain on 1 column (full width).

I would add an image, but I don't have enough replica points.

I know that there is something like a collection view ... but I am not very good at it, and I was hoping that maybe there is an easier way than re-creating the view manager and all the connections that I have already created there.

Since I am already using tableview .. what's the best way to change the layout to fit me now?

+3
source share
3 answers

You can use UICollectionView with flowlayout and cell width. There are many textbooks about this. You can also try this library: https://github.com/bryceredd/RFQuiltLayout

0
source

Based on what you are trying to do, a UICollectionView may not be the best choice. I would create a second type of UITableViewCell for these 4-column rows. Should this help Multiple custom UITableView strings?

+1
source

You viewed this library: TSUIKit

If you just want to quickly organize your data, it will be much easier than trying to argue with UICollectionView.

0
source

All Articles