标签:边框颜色 custom uibutton 弧度 ram 自己 width uicolor ack
//例如:
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(50,50,100,40);
button.backgroundColor = [UIColor blueColor];
//关键语句
button.layer.cornerRadius = 2.0;//2.0是圆角的弧度,根据需求自己更改
button.layer.borderColor = [UIColor blackColor];//设置边框颜色
button.layer.borderWidth = 1.0f;//设置边框颜色
标签:边框颜色 custom uibutton 弧度 ram 自己 width uicolor ack
原文地址:https://www.cnblogs.com/liuzhi20101016/p/11695686.html