How can I let the only two bottom corners to be rounded in Swift?
let maskPathTop = UIBezierPath(roundedRect: tableView.bounds, byRoundingCorners: [.BottomLeft, .BottomRight], cornerRadii: CGSize(width: 5, height: 5.0))
let shapeLayerTop = CAShapeLayer()
shapeLayerTop.frame = tableView.bounds
shapeLayerTop.path = maskPathTop.CGPath
tableView.layer.mask = shapeLayerTop
I have tried this code but it didn't work. Any help would be appreciated.