title: How to change the height of the separator in UITableView Swift
body: <p>This question has been around for a while, but this is a slightly different variation. I want to increase the height of the separator in the UITableView so it REALLY increases the height and doesn't just take up space within the cell. I am also putting a radius on the cell as well.</p>
  
  <p>The code I have to customise the cell is below. I have also tried a variant in cellForRowAtindexPath adding a view to each cell, which has the same effect. They only take up space within the cell, rather than replacing the separator with a new view. </p>
  
  <p>I want the space between the cells to be 20pt and clear color.... is this possible?</p>
  
  <pre><code>class CustomTVC: UITableViewCell {
  
  override func awakeFromNib() {
      super.awakeFromNib()
      // Initialization code
  
      let mScreenSize = UIScreen.main.bounds
      let mSeparatorHeight = CGFloat(20.0) // Change height of speatator as you want
      let mAddSeparator = UIView.init(frame: CGRect(x: 0, y: self.frame.size.height - mSeparatorHeight, width: mScreenSize.width, height: mSeparatorHeight))
      mAddSeparator.backgroundColor = UIColor.orange // Change backgroundColor of separator
      self.addSubview(mAddSeparator)
  
  }
  
  override func setSelected(_ selected: Bool, animated: Bool) {
      super.setSelected(selected, animated: animated)
  
      // THIS ADDS THE CORNER RADIUS
      self.layer.cornerRadius = 20
      self.layer.masksToBounds = true
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/VY7KL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VY7KL.png" alt="enter image description here"></a></p>