UIButton with Custom border colour, iPhone

后端 未结 5 1683
离开以前
离开以前 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:19

    You should set type of your UIButton to Custom, not Rounded Rect (if you are creating button via IB).

    If you are creating UIButton programmatically then you this code:

    UIButton *but = [UIButton buttonWithType:UIButtonTypeCustom];
    

    And after that you can make your own customizations.

提交回复
热议问题