您的位置:首页 > 其它

给Button设置圆角

2016-05-24 21:47 288 查看
//UIButtonTypeRoundedRect 四个角是圆弧形状

UIButton *button = [UIButton
buttonWithType:UIButtonTypeRoundedRect];

//设置圆角

[button.layer setMasksToBounds:YES];

[button.layer setCornerRadius:20.0];

//设置边框的宽度(1.0的效果就很不错了)


[button.layer
setBorderWidth:1.0];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Button 圆角