How to make a simple rounded button in Storyboard?

后端 未结 13 1819
渐次进展
渐次进展 2021-01-29 19:49

I just started learning iOS development, cannot find how to make simple rounded button. I find resources for old versions. Do I need to set a custom background for a button? In

13条回答
  •  有刺的猬
    2021-01-29 20:14

    To do it in the storyboard, you need to use an image for the button.

    Alternatively you can do it in code:

     btn.layer.cornerRadius = 10
     btn.clipsToBounds = true
    

提交回复
热议问题