set cornerRadius and setbackgroundimage to UIButton

后端 未结 7 1106

I am trying to set cornerRadius of UIButton but I dont know how to do it.

If I do like this:

button.layer.cornerRadius = 5;

works w

7条回答
  •  滥情空心
    2020-12-23 20:03

    Set corner Radius in Identity Inspector for Button. See Pic

    Set Background image in Attribute Inspector for Button. See pic

提交回复
热议问题