title: Round upper corners for UITableView
body: <p>I'm trying to round upper corners for <code>UITableView</code>. But Table view is not displaying. What is wrong here ?</p>
  
  <p>// TableView setup</p>
  
  <pre><code>lazy var tableView: UITableView = {
          let tv = UITableView()
          tv.delegate = self
          tv.dataSource = self
          tv.separatorStyle = .none
          tv.backgroundColor = .white
          tv.layer.masksToBounds = true
          tv.roundUpperCorners(radius: 12)
          return tv
      }()
  </code></pre>
  
  <p>// Round upper corners.</p>
  
  <pre><code> func roundUpperCorners(radius: CGFloat) {
          let maskPath = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: radius, height: radius))
          let maskLayer = CAShapeLayer()
          maskLayer.frame = self.bounds
          maskLayer.path = maskPath.cgPath
          self.layer.mask = maskLayer
      }
  </code></pre>