7如何在xib或者storyboard中设置button的圆角
文章目录
在xib或者storyboard中,可以给button设置圆角。具体操作步骤如下:
1、切换到xib或者storyboard,选中UIButton对象,打开右侧栏Hide or show the Utilities的Show the Identity inspector,在User Defined Runtime Attributtes中添加2个Key Path:
layer.cornerRadius,Type是Number;- 和
layer.masksToBounds,Type是Boolean;
如图:
运行后效果如下:

