How to set rectangle border for custom type UIButton

前端 未结 6 534
臣服心动
臣服心动 2020-12-28 08:55

I am trying to set an image as the background of a custom UIButton. I was able to set a background image for the \"rounded rect\" UIButton in interface builder, but now the

6条回答
  •  -上瘾入骨i
    2020-12-28 09:44

    When you set a background image in a button, the button outlines go away. Include them in your image, if you need different sizes look at the UIImage

    stretchableImageWithLeftCapWidth:topCapHeight:

    method.

提交回复
热议问题