I have a UICollectionView with two columns. I need to put a vertical line through out my collectionView between the columns. Is it possible? Which property of collectionView allows us to achieve it?
Asked
Active
Viewed 2,012 times
1
-
You could probably just increase the spacing between cells: http://stackoverflow.com/questions/17229350/cell-spacing-in-uicollectionview – peterp Mar 04 '16 at 08:28
-
I have already done that. I need to put a vertical line as part of my UI. – MrDank Mar 04 '16 at 08:29
-
You also can add an UIView inside your collectionViewCell and do some design on it to make it look nicer. – Lee Mar 04 '16 at 08:30
-
then set the background color so it will give you that feel – techloverr Mar 04 '16 at 08:30
-
I was thinking about doing that. Is there any property UICollectionView has similar to UITableView's separatorStyle property? – MrDank Mar 04 '16 at 08:31
-
nope collectionView does not have property related to separator – techloverr Mar 04 '16 at 08:38
-
Okay. Thanks for the help. – MrDank Mar 04 '16 at 08:41
1 Answers
1
Yes this is possible. I suggest you have a look at Decoration views for the collection view - it will allow you to do this. Here is a tutorial: https://markpospesel.wordpress.com/2012/12/11/decorationviews/

totiDev
- 5,189
- 3
- 30
- 30