How to set corner radius for different corner? For example, I want top left, top right, bottom left to have corner radius 5.0, but bottom right to have 0.0

1
2
3
4
5
6
let cornerRadius = UIBezierPath(roundedRect: quickSelectionView.bounds,
byRoundingCorners: [.topLeft, .topRight, .bottomLeft],
cornerRadii: CGSize(width: 5.0, height: 0.0))
let maskLayer = CAShapeLayer()
maskLayer.path = cornerRadius.cgPath
quickSelectionView.layer.mask = maskLayer

Reference