UICollectionView draws lines between cells

Is there a way to draw lines between cells in a UICollectionView? I do not want to add a border to each cell, which will lead to the drawing of lines only if there are cells in the collection. What I'm looking for is similar to UITableView rows: they are there, even if there are 0 cells in the table view.

+3
source share
2 answers

I solved this by adding views to collectionView. I used the cell coordinates of the cell to determine where I want to draw.

However, perhaps the best way to do this?

0
source

UITableView, . backgroundColor:

UIImage *patternImage = [UIImage imageNamed:@"pattern.png"];
tableView.backgroundColor = [UIColor colorWithPatternImage:patternImage];

UPD: . tableView ( scrollView).

-2

All Articles