Is there a way to set cornerRadius for only top-left and top-right corner of a UIView?
cornerRadius
UIView
I tried the following, but it end up not seeing the
This would be the simplest answer:
yourView.layer.cornerRadius = 8 yourView.layer.masksToBounds = true yourView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]