I'm trying to achieve a view like this:
I've been trying using this piece of code
let maskPath = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: [.topRight, .topLeft], cornerRadii: CGSize(width: 140, height: 140))
But all I got is something like this:
I've already tried to change width
and height
values, but the view seems to not change at all, so how do I draw a view which contains that rounded top as shown in the first image?
Thanks for suggesting a solution , but as I said above, I can set the corners rounded, I can't make only the top of my view circular, so this is a different question.