1

I'm currently trying to make a UICollectionView work as UITableView, so I have to set the color of the "cell separator". Currently, I get the color by UITableView().separatorColor. However, this color, for some strange reason, seems significantly darker than the color of the default table view cell separators.

Does anyone know how to get the proper default separatorcolor? I'm guessing that there's an opacity associated, hence causing my custom one to appear darker.

tyou
  • 21
  • 1
  • You can change the seprator color of tableview please refer this link https://stackoverflow.com/questions/3364859/uitableview-separator-color-where-to-set – Anita Nagori Oct 26 '17 at 04:42

2 Answers2

1

Try

UITableView().separatorColor
Shalugin
  • 1,092
  • 2
  • 10
  • 15
0

You can set the color of the separator by doing this

tableView.separatorColor = UIColor.red