1

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

Shiva_iOS
  • 47
  • 1
  • 6

1 Answers1

0

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?