How to change the color of seperator in tableView?

Ulu*_*bek 0 uitableview ios swift

I am currently creating collectionView cells inside of TableViewCell but I want to separate each TableViewCell with default separator but changing its color. Please help me with this. Or Can I remove all separator lines and use custom UIView to separate them?

PGD*_*Dev 5

Simply update the separatorColor property of tableView with the required UIColor instance.

tableView.separatorColor = .red
Run Code Online (Sandbox Code Playgroud)

In case you want to update it via storyboard, you can with the tableView's attributes inspector like,

在此处输入图片说明