UIButton with Custom border colour, iPhone

后端 未结 5 1736
离开以前
离开以前 2021-02-04 04:47

I want to create Custom UIButton with rectangular shape. for this I am using rectangular view as a Background for UIButton and making UIbuttons background colour as clearcolor.

5条回答
  •  青春惊慌失措
    2021-02-04 05:00

    I wasted a few minutes and got frustrated that the border was not showing up even though I was setting the layer property as suggested above.

    When I set the width using the following, I saw the button border.

    [[button layer] setBorderWidth:2.0f];
    

提交回复
热议问题