UIButton with Custom border colour, iPhone

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

    Try this:

        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        [button.layer setBorderColor:[[UIColor clearColor] CGColor]];
    

    but don't forget to add in your .h or .m file

    #import 
    

提交回复
热议问题