My goal is to make my button look like this:
minus the black edges around the button.
After reading quite a few posts, I see most solutions saying to use
layer.cornerRadius = 10.0
When I do that I get this:
It rounds the edges, but doesn't give me my desired goal.
Any suggestion?
Rob
You Can do it like this (For Example if you button is called button):
button.layer.cornerRadius = button.bounds.size.height / 2.0
来源:https://stackoverflow.com/questions/40185419/how-to-make-a-rounded-oval-button