How make UIVIEW corner radius in specific side and different?

31 Views Asked by At

I have attached the image. I want create corner radius of UIView. Please look image https://i.stack.imgur.com/AkUuO.png

1

There are 1 best solutions below

0
On

Hope this helps:

let redBox = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
redBox.backgroundColor = .red
redBox.layer.cornerRadius = 25
redBox.layer.maskedCorners = [.layerMaxXMaxYCorner]

Looks like a similar question asked here: How to set cornerRadius for only top-left and top-right corner of a UIView?