reid55
reid55

Reputation: 169

Is there a way to have just one rounded corner on a UIButton?

On a UIButton, I know how to create 4 rounded corners, and I know how to create 4 squared corners, but now what I need is a way to create a UIButton with 3 squared corners and 1 rounded corner. Is there a way to do that? Thanks.

Upvotes: 0

Views: 3413

Answers (1)

PengOne
PengOne

Reputation: 48398

Yes, you can do this. You just need to modify the code slightly from the following posts:

Just two rounded corners?

Round two corners in UIView

You can also hack this by rounding all corners of one UIView and then adding two other UIViews on top to "unround" the top two and left two corners, leaving just the lower right corner rounded.

Upvotes: 5

Related Questions