您的当前位置:首页正文

设置圆角

来源:要发发知识网

1.使用xib

在User Defined Runtime Attributes点击+

Key Path                      Type                 Value

layercorderRadius      Nsbumber            5

2.使用代码

//1.设置边框颜色

_view.layer.borderColor= [UIColorlightGrayColor].CGColor;

//2.设置边框的宽度

_view.layer.borderWidth=2;